Android Studio 3.0 and gradle upgrade - base.apk code is missing while creating apk

∥☆過路亽.° 提交于 2019-12-06 08:02:41

问题


I tried to upgrade my gradle from 2.3.3 to 3.0.0 in Android Studio 3.0 (stable).

Project builds fine but I get issue while creating/installing APK:

Failure [INSTALL_FAILED_INVALID_APK: Package couldn't be installed in /data/app/xxxx Package /data/app/xxxx/base.apk code is missing]

$ adb shell pm uninstall xxxx
Unknown failure (at android.os.Binder.execTransact(Binder.java:674))
Error while Installing APK

If I build standalone APK and install it directly on device/emulator I get that it is malformed/incorrect.

Project is with Kotlin, and DexGuard 8.0.12 which should allow for Kotlin and gradle 3.0.

What is more annoying is fact that issue persist event after reverting to 2.3.3 gradle (Clean & Invalidate, Clean Build, remove /build paths - I tried it all).


回答1:


Fix was to update to DexGuard 8.0.17 (not listed yet in release notes).




回答2:


The issue is fixed in DexGuard 8.1.11.



来源:https://stackoverflow.com/questions/47032757/android-studio-3-0-and-gradle-upgrade-base-apk-code-is-missing-while-creating

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