【发布时间】:2016-04-27 18:11:54
【问题描述】:
我正在尝试创建“属性”并将文件名“gradle.properties”分配给相同的文件以签署我的 android 应用程序。由于某种原因它找不到该文件。它存在于“C:\Users\'用户名中'\Reader_Mobile_App\ \Reader_Mobile_App\app' 目录。错误提示“在项目 ':app' 上找不到属性“gradle.properties”。 我是 android 开发新手,非常感谢任何意见。
谢谢!
apply plugin: 'com.android.application'
android {
Properties props = new Properties()
props.load(new FileInputStream(file(project.property("gradle.properties"))))
signingConfigs {
release {
keyAlias 'release'
keyPassword props['keystore.password']
storeFile file(props['keystore'])
storePassword props['keystore.password']
}
debug {
keyAlias 'debug'
keyPassword props['keystore.password']
storeFile file(props['keystore'])
storePassword props['keystore.password']
}
}
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId 'com.troxler.version1p1'
minSdkVersion 14
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
debuggable true
signingConfig signingConfigs.release
}
debug {
signingConfig signingConfigs.debug
}
}
productFlavors {
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile files('libs/junit-4.7.jar')
}
【问题讨论】:
标签: android android-studio build.gradle