gpt4 book ai didi

android - 带有 packageRelease “specified for property ' signingConfig.storeFile' 的 Gradle 签名应用程序不存在”

转载 作者:IT王子 更新时间:2023-10-28 23:35:50 28 4
gpt4 key购买 nike

我正在尝试在 Android Studio 中通过使用 Gradle 的项目在 Release模式下使用 Build Variant 测试应用。

build.gradle:

(omitted dependencies and repositories)

android {
apply plugin: 'android'
compileSdkVersion 19
buildToolsVersion "19.0.0"

defaultConfig {
minSdkVersion 11
targetSdkVersion 16
versionCode 1
versionName "1.0"
}

signingConfigs {
release {
storeFile file("release.jks")
storePassword "password"
keyAlias "MobileAndroid"
keyPassword "password"
}
}

buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
}
}
}

如果 Build Variant 是 release Gradle 返回错误

A problem was found with the configuration of task ':app:packageRelease'.

File '/Users/andre/workspace/MobileAndroid/app/release.jks' specified for property 'signingConfig.storeFile' does not exist.

删除“signingConfig.storeFile”会返回 Android Studio 消息框错误:

Application Installation Failed

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.

release.jks 存在并且使用 Android Studio 向导“Build > Generate Signed APK...”我可以生成一个 app.apk 签名。

如何解决 Gradle 中的这个错误?

最佳答案

请仔细检查该文件是否存在于错误消息所在的位置 (Users/andre/workspace/MobileAndroid/app/release.jks),并且没有权限问题阻止文件被读取。

关于android - 带有 packageRelease “specified for property ' signingConfig.storeFile' 的 Gradle 签名应用程序不存在”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21780847/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com