我尝试在发布版本类型上安装应用程序,我得到一般错误: “解析错误。解析包时出现问题”
安装调试apk工作成功。
使用adb安装release apk显示以下信息:
C:\ android-sdk-windows \ platform-tools> adb install app-release-unsigned.apk
2577 KB / s(1606060字节,0.608s) pkg:/data/local/tmp/app-release-unsigned.apk
失败[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
这是logcat
V / ApplicationPolicy:isApplicationStateBlocked userId 0 pkgname com.android.packageinstaller I / ActivityManager:START u0 {act = android.intent.action.VIEW dat = file:/// storage / emulated / 0 / Download / app-> >释放-unsigned.apk 典型值=应用/ vnd.android.package归档 cmp = com.android.packageinstaller / .PackageInstallerActivity(has 来自uid 10019的显示0
d / CustomFrequencyManagerService: acquireDVFSLockLocked:type:DVFS_MIN_LIMIT frequency:1190400 uid:1000 pid:961 pkgName:ACTIVITY_RESUME_BOOSTER @ 4
W / ActivityManager:mDVFSHelper.acquire() D / InputDispatcher:聚焦 应用程序设置为:xxxx D / InputDispatcher:Focus left window:22409 /? D / MyFiles:FileUtils :: update文件打开计数D / DisplayManager: addAllDisplaysLocked() D / ActivityManager:启动 com.android.packageinstaller,更新优先级 D / SSRM:a:DeviceInfo :: 000000000000 D / SSRM:a:SettingsAirViewInfo :: 000000000 /?
W / PackageInstaller:解析清单时解析错误。停止安装
模块build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "xxxxxx.yyyy.zzzzz"
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':SAPE.Lib')
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.android.support:appcompat-v7:21.0.3'
}
答案 0 :(得分:0)
您正在使用命令
安装未签名的apkadb install app-release-unsigned.apk
生成签名的apk时,请记住保存已签名apk的路径并从该位置安装apk。它应该安装得很好。