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.
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.
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 .
Click on Build>Build APK. Inside your Project folder , go to the build directory and your . apk will be there.
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"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With