Daan
Daan

Reputation: 147

Unable to extract Crashlytics build info from the dropped APK

I'm trying to upload an .apk file to Crashlytics to be distributed with the 'Beta' app, but I'm getting the following error when dropping my .apk in the upload menu:

Unable to extract Crashlytics build info from the dropped APK. Please make sure your Crashlytics build tool plugin is installed and enabled.

I've enabled Crashlytics as suggested by the Fabric app: I've put Fabric.with(this, new Crashlytics(), new CrashlyticsNdk()); in my MainActivity, and my build.gradle file is as follows:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

crashlytics {
    enableNdk true
    androidNdkOut 'src/main/obj'
    androidNdkLibsOut 'src/main/libs'
}

And:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
        transitive = true;
    }
    compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.1@aar') {
        transitive = true;
    }

I'm also using the following settings:

targetSdkVersion 25
compileSdkVersion 25
buildToolsVersion '26'
classpath 'com.android.tools.build:gradle:2.3.0'

I don't know what's going wrong. I've used Crashlytics and the distribution tool in the past without any issues. The Crashlytics plugin does seem to work in the app though, when I trigger an exception it shows up in the web interface.

I'm kinda lost here to what the problem might be so any help is greatly appreciated.

Upvotes: 5

Views: 2161

Answers (3)

Leonardo Sibela
Leonardo Sibela

Reputation: 2189

Selecting Clean Project under Build on the Main Menu fixed the problem for me.

Upvotes: 0

Mark Pazon
Mark Pazon

Reputation: 6205

Or you can build it through Gradle command line likeso "./gradlew clean assemble[yourBuildVariant]" and drag and drop that to Fabric Beta.

Upvotes: 0

Daan
Daan

Reputation: 147

Fixed it by reinstalling Android Studio.

Edit:

I found out the issue is related to enabling Instant Run in Android Studio, a while after reinstalling Android Studio I enabled Instant Run and the issue returned.

Disabling Instant Run again solved the issue

How to turn off Instant Run is explained in this post

Upvotes: 4

Related Questions