Is there a way to load a signed apk in crashlytics?

I am trying to load my application in crashlytics. I tried to create an application 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 download a signed APK? I can build in Android normally, but this does not cause loading in crashlytics.

+6
source share
2 answers

Got a response:

You must specify the signature configuration in the Gradle files. If you do not, it will not generate a signed .apk file in the directory "/ build / output / apk /".

Example (add this to 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" } } 
+4
source

If you want to load unsigned or debug apk into Crashlytics, use the following command:

./gradlew clean assembleDebug crashlyticsUploadDistributionDebug

-2
source

Source: https://habr.com/ru/post/986623/


All Articles