我升級我的Android工作室從1.5到2.2,現在運行我的應用程序時出現錯誤:安裝失敗,因爲APK要麼沒有簽訂
Installation failed since the APK was either not signed, or signed incorrectly. If this is a Gradle-based project, then make sure the signing configuration is specified in the Gradle build script.
我已經GOOGLE了它,並沒有什麼工作對我來說,我的gradle文件是:
...
android {
signingConfigs {
myapp_signed {
keyAlias 'mkey'
keyPassword 'pwd'
storeFile file('.../_keystore.jks')
storePassword 'pwd'
}
}
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
applicationId '...'
minSdkVersion 14
targetSdkVersion 22
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.myapp_signed
}
}
productFlavors {
}
}
...
有沒有人知道如何解決這個問題?之前,我得到這個錯誤,我有另外一個錯誤,這是說:
Warning:Gradle version 2.10 is required. Current version is 2.2. If using the gradle wrapper, try editing the distributionUrl in C:\Users\blahblah\myproject\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip
我解決了這樣的"Gradle Version 2.10 is required." Error
編輯: 即使我切換建立變種回調試,卸載應用程序,再試一次我得到同樣的錯誤。
是否使用「...」的文件路徑或者是隻是爲了掩蓋個人信息? –
這只是爲了obsucre個人信息:D –
可能的重複: http://stackoverflow.com/questions/28884929/android-studio-installation-failed-since-apk-was-not-signed –