我在我的项目中使用第一次git hub库并且是android的新手。我正在尝试制作我需要使用图形的项目我从git hub使用easy图形项目但是它给了我一个错误
错误:(9,0)无法在SigningConfig_Decorated上找到属性'file'{name = release,storeFile = null,storePassword = null,keyAlias = null,keyPassword = null,storeType = null}。
这是可用的文件编码
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
signingConfigs {
release {
storeFile file(STORE_FILE)
storePassword STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
defaultConfig {
applicationId "org.eazegraph.app"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
// this is used to alter output directory and file name. If you don't need it
// you can safely comment it out.
applicationVariants.all { variant ->
variant.outputs.each { output ->
def file = output.outputFile
String parent = file.parent
if (project.hasProperty('OUTPUT_DIR') && new File((String) OUTPUT_DIR).exists())
parent = OUTPUT_DIR
output.outputFile = new File(
parent,
(String) file.name.replace(
".apk",
// alter this string to change output file name
"-" + defaultConfig.versionName + "-build" + defaultConfig.versionCode + ".apk"
)
)
}
}
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':EazeGraphLibrary')
compile 'com.android.support:appcompat-v7:21.0.3'
}
任何帮助请...
答案 0 :(得分:2)
您的脚本中似乎没有定义变量STORE_FILE, STORE_PASSWORD, KEY_ALIAS, KEY_PASSWORD
。你可以这样做:
apply plugin: 'com.android.application'
def STORE_FILE= "File location goes here"
def STORE_PASSWORD= "Store password"
def KEY_ALIAS= "Alias to use"
def KEY_PASSWORD= "password to the alias"
android {
....
}