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

﹥>﹥吖頭↗ 提交于 2019-12-22 06:43:03

问题


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.


回答1:


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.




回答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.




回答3:


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 !




回答4:


I solved the problem removing

android:extractNativeLibs="false"

from the AndroidManifest, until Fabric fixes the issue.




回答5:


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



来源:https://stackoverflow.com/questions/44564545/getting-error-the-package-appears-to-be-corrupt-in-fabric-beta-on-android-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!