Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to upload the signed apk to crashlytics?

I am trying to upload my app to crashlytics. I have tried building the app in Android Studio but I keep getting this message. See screenshot.

enter image description here

Then I tried the command line

./gradlew assembleRelease crashlyticsUploadDistributionRelease

:app:crashlyticsUploadDistributionRelease
Uploading /Users/jgs/Projects/Personal/APP_NAME/app/build/outputs/apk/app-release-unsigned.apk to Crashlytics...
 WARN - Crashlytics halted compilation because it can't distribute the unsigned APK: /Users/jgs/Projects/Personal/APP_NAME/app/build/outputs/apk/app-release-unsigned.apk
:app:crashlyticsUploadDistributionRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:crashlyticsUploadDistributionRelease'.
> Distribution upload failed.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 51.465 secs

Is there a way to manually upload the signed APK? I can build in Android ok, but that does not trigger an upload to crashlytics.

like image 268
Jack Shultz Avatar asked May 06 '15 02:05

Jack Shultz


People also ask

Can I upload unsigned APK to play store?

You cannot upload to Google Store a not signed and not aligend APK. Ask your developer to give you the signed and aligend APK. Or you can ask them to provide the key to you so you can sign and align it yourself using that key .

Where is signed APK located Android studio?

Click on Build>Build APK. Inside your Project folder , go to the build directory and your . apk will be there.


1 Answers

Got the answer:

You should provide the signing configuration within the Gradle files. If you don't it will not generate the signed .apk file within the "/build/outputs/apk/" directory.

Example (add this within the android section of your Gradle file):

buildTypes {
    release {
        ...
        signingConfig signingConfigs.release
    }
}

signingConfigs {
    release {
        // this keystore is located at module level
        storeFile file("certs/keystore.jks")
        storePassword "YOUR_PASSWORD"
        keyAlias "your_project_alias"
        keyPassword "YOUR_PASSWORD"
    }
}
like image 191
Ben Groot Avatar answered Oct 18 '22 12:10

Ben Groot