Getting error "The package appears to be corrupt" in Fabric Beta on Android 6
Asked Answered
L

5

5

All my beta testers with Android 6 get this error when installing my app from Beta:

App not installed. The package appears to be corrupt

No problems for users with Android 7+. The APK can be dirrectly installed on all devices, including those with error in Beta. The problem appeared a few days ago, configuration of project did not change.

All my users uses latest 1.7.0 Beta app. Project dependencies:

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}

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

Any help?

UPD. I removed android:extractNativeLibs="false" from AndroidManifest.xml and now it works.

Lakitalaks answered 15/6, 2017 at 10:0 Comment(4)
Todd from Fabric. Are you using ABI splits in your app? This could cause this type of issue. Let me know! :)Casanova
No, I use native code without ABI splits. I am also using android:extractNativeLibs="false" in manifest, can this cause this problem?Lakitalaks
Thanks Rzhik. Can you test a distribution with that change to see if it clears things up? We haven't seen other reports of this issue, so it is likely project specific. Thanks!Casanova
Thanks for the help. I've found the problem, it was in android:extractNativeLibs="false" row in my manifest file. I removed it and now it works.Lakitalaks
K
2

For me the solution was to downgrade gradle from version 3.0.0 (introduced with Android Studio 3) to 2.3.3 (previous version). I made this by replacing this line in the project .gradle file:

    buildscript {
    repositories {
        ...
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
        ...
    }
}

With:

    buildscript {
    repositories {
        ...
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
        ...
    }
}

After a clen and build i was able to upload my app to Beta and install it with no problem.

Kutenai answered 9/11, 2017 at 16:44 Comment(0)
F
2

You need to build the apk first by :-1 Build > Build apk(s) This is because of security issue. if any non-developer want your APK, so its easily to get it from your folder. so now it does not happen only developer will able to create sharable APK.

Fugleman answered 20/11, 2017 at 13:23 Comment(0)
S
1

I answered a similar question here

Since Android Studio 3.0, I have the exact same problem if I try to upload an apk via the user interface.

For now, you will have to use the command line in order to upload an apk, as the documentation says.

./gradlew assembleDebug crashlyticsUploadDistributionDebug

I hope this will help !

Sinapism answered 1/11, 2017 at 20:5 Comment(0)
T
0

I solved the problem removing

android:extractNativeLibs="false"

from the AndroidManifest, until Fabric fixes the issue.

Trista answered 4/7, 2017 at 13:23 Comment(0)
A
0

After searching a lot i find a solution:

Go to Build-> Build Apk(s).

After create apk you will show dialog as below.

Click on locate and install it into your phone

Enjoy

Acetum answered 21/11, 2017 at 6:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.