jesobremonte
jesobremonte

Reputation: 3396

Flutter APK release build fails to upload to Fabric Beta

Having this issue only with Flutter builds. I've tried uploading both with the Android Studio Fabric plugin, and with Fastlane command.

When attempting to upload using the Android Studio Fabric plugin drag & drop, an error displays showing: Unable to extract Crashlytics build info from the dropped APK. Please make sure your Crashlytics build tool plugin is installed and enabled.

When attempting to uploading using Fastlane with command: fastlane run crashlytics apk_path:"/home/me/app-release.apk" api_token:"xxx" build_secret:"xx"

This error comes up:

[17:26:01]: -------------------------
[17:26:01]: --- Step: crashlytics ---
[17:26:01]: -------------------------
[17:26:01]: Uploading the build to Crashlytics Beta. Time for some ☕️.
[17:26:02]: Shell command exited with exit status 1 instead of 0.

[!]  WARN - Crashlytics halted compilation because it can't extract Crashlytics build info from the APK: /home/me/app-release.apk
Exception in thread "main" com.crashlytics.tools.android.exception.PluginException: Distribution upload failed.
        at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:667)
        at com.crashlytics.tools.android.DeveloperTools.processArgsInternal(DeveloperTools.java:348)
        at com.crashlytics.tools.android.DeveloperTools.main(DeveloperTools.java:273)
Caused by: com.crashlytics.tools.android.exception.DistributionException: Crashlytics halted compilation because it can't extract Crashlytics build info from the APK: /home/me/app-release.apk
        at com.crashlytics.tools.android.DistributionTasks.uploadDistribution(DistributionTasks.java:64)
        at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:665)
        ... 2 more

Steps I have taken to implement crashlytics:

Am I missing anything? Has anyone had success with uploading a Flutter build to Fabric Beta and somehow resolved the Crashlytics info missing error?

Upvotes: 1

Views: 688

Answers (2)

Guillaume B
Guillaume B

Reputation: 113

After reaching Fabric for a similar problem, the problem was the gradle version.

Switch to this in your gradle file :

classpath 'com.android.tools.build:gradle:3.2.1'

Upvotes: 0

Chintan
Chintan

Reputation: 671

In your build.gradle file, make sure you assign values to versionCode and versionName:

versionCode 1
versionName "1.0"

Upvotes: 0

Related Questions