I just upgraded my Android Studio from 1.5 to 2.2, and now when running my App I get the error:
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.
I already googled for it, and nothing worked for me, my gradle file is:
...
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 {
}
}
...
Does anybody know how to solve this? Right before I got this error, I got another error, which was saying:
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
which I solved like this "Gradle Version 2.10 is required." Error
EDIT: Even if I switch build variants back to debug, uninstall the app and try it again I get the same error.