在这里,我添加了最新的 google play services(com.google.gms:google-services:3.0.0), gradle(com.android.tools.build:gradle:2.2.0-alpha)。在我的设备中安装时出现以下错误。
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
packagingOptions {
exclude 'META-INF/NOTICE' // will not include NOTICE file
exclude 'META-INF/LICENSE' // will not include LICENSE file
exclude 'META-INF/maven/com.squareup.retrofit/retrofit/pom.properties'
exclude 'META-INF/maven/com.squareup.retrofit/retrofit/pom.xml'
exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.xml'
exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.properties'
}
defaultConfig {
applicationId "com.wolfmatrix.navz"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
最佳答案
报错表明apk签名不正确
试试这个-
1) 从 "{WORKSPACE}\{YOUR APP FOLDER}\app\build\outputs\apk" 中删除您签名的 apk。
2) 从设备上卸载您的应用。
3) 通过 USB 调试运行项目以创建 app-debug.apk
4) 成功构建后,您可以签署您的应用程序 apk 以进行发布。
希望对你有帮助:)
更新
检查这个 - Installation failed with Android Studio, APK not signed
关于android - 应用程序安装失败,构建脚本错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37875037/