Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 697
rzhik Avatar asked Jun 15 '17 10:06

rzhik


3 Answers

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.

like image 105
nicola.lasagni Avatar answered Nov 18 '22 21:11

nicola.lasagni


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.

like image 27
Samwinishere Here Avatar answered Nov 18 '22 22:11

Samwinishere Here


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 !

like image 1
SebVay Avatar answered Nov 18 '22 21:11

SebVay