我在Android 5.1中安装apk时遇到错误。
Package couldn't be installed in /data/app/com.acelrtech.apps.xxxxxxxxx-1
com.android.server.pm.PackageManagerException: scanPackageLI
at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:6313)
at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:5605)
at com.android.server.pm.PackageManagerService.installNewPackageLI(PackageManagerService.java:10550)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:11128)
at com.android.server.pm.PackageManagerService.access$2800(PackageManagerService.java:241)
at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:8993)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
这是Gradle的主要部分看起来像。希望有更好的投入。
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.acelrtech.apps.xxxxxxxxxxxx”
minSdkVersion 14
targetSdkVersion 21
versionCode 23
versionName "2016.6.21"
generatedDensities = []
multiDexEnabled true
}
我也试过这个solution ..