question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fastlane crashlytics step: halted compilation - can't extract Crashlytics build info from APK

See original GitHub issue

I’ve seen this reported in multiple places, however cannot seem to find any info regarding a fix.

The full error when trying to run an fastlane flutter build using com.crashlytics.sdk.android:crashlytics:2.9.9@aar is

+------+-----------------------------+-------------+
|                 fastlane summary                 |
+------+-----------------------------+-------------+
| Step | Action                      | Time (in s) |
+------+-----------------------------+-------------+
| 1    | update_fastlane             | 7           |
| 2    | default_platform            | 0           |
| 3    | gradle                      | 4           |
| 4    | flutter build apk           | 75          |
|      | --target\=lib/config/produ  |             |
|      | ction.dart --rele           |             |
| 5    | read_pubspec_version        | 0           |
| 6    | read_changelog              | 0           |
| 💥   | crashlytics                 | 0           |
+------+-----------------------------+-------------+

[14:42:58]: fastlane finished with errors

[!]  WARN - Crashlytics halted compilation because it can't extract Crashlytics build info from the APK: /Users//xxx/xx/xx/build/app/outputs/apk/release/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: /Users/xxx/xx/xxx/build/app/outputs/apk/release/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

have followed the exact installation configurations and examples from this repo, but to no avail. it used to work fine.

this happened after we upgraded flutter project for AndroidX doing the following in dependencies

compile('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
        transitive = true;
    }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vnagendracommented, Apr 30, 2019

Fought the same problem for a few hours. I have two projects one of which was doing just fine and the other was having this issue. Went through app/build.gradle line by line trying to figure out what is going on. Here are some steps for posterity

  1. Check to see if crashlytics-build.properties is present in the APK. You’ll need an APK viewer (such as the one bundled with Android Studio).
  • This file can be found in the assets folder (inside the APK)
  • This file is also generated as an intermediate, which maybe easier to find like so. Execute this find from the project directory (where you can find pubspec.yaml file.
➜  project git:(master) ✗ find build -name crashlytics-build.properties
build/app/intermediates/merged_assets/release/out/crashlytics-build.properties
  • Goes without saying, if this isn’t found, it isn’t going to work 😀
  1. For some strange reason, version flutter_crashlytics: ^ 0.2.1+1 and flutter_crashlytics: ^1.0.0 both have a dependency on kotlin plugin.
  • My project with 0.2.1 happened to be kotlin, because of which I missed this
  • So adding apply plugin: 'kotlin-android' in the app/build.gradle magically made this file appear!

I’d be very curious to hear why that is the case, because the example project doesn’t seem to have this dependency at all. I wonder why the example project is working (or why my project wasn’t working).

0reactions
zanukacommented, May 10, 2019

adding the apply plugin: 'kotlin-android' to app/build.gradle did the trick, but only with the following in the android build.gradle:

buildscript {
    repositories {
        google()
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://plugins.gradle.org/m2/' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
        classpath 'com.android.tools.build:gradle:3.3.2'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter APK release build fails to upload to Fabric Beta
WARN - Crashlytics halted compilation because it can't extract Crashlytics build info from the APK: /home/me/app-release.apk Exception in ...
Read more >
error when using to upload build to fabric crashlytics #4222
The issue here is that I'm not exporting a full fledged Android project, I'm building an APK through Unity, and gradle and its...
Read more >
App Distribution troubleshooting & FAQ - Firebase - Google
This page provides troubleshooting help and answers to frequently asked questions about distributing and testing apps with App Distribution.
Read more >
How to expose the apk uploaded to crashlytics generated by ...
Hi I recently imported an android project on bitrise and created a workflow for it Since the project already has fastlane added.
Read more >
Page 2 - diego.org
Fastlane solution for Crashlytics – Missing dSYMs. Published October 24, 2017 by doug. While working on a new Xcode project, I was unable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found