[英]Could not get unknown property 'ANDROID_SUPPORT_VERSION' for project ':demo' of type org.gradle.api.Project
I am trying to use this library : https://github.com/telly/MrVector in my android studio project. 我想在我的android工作室项目中使用这个库: https : //github.com/telly/MrVector 。 So what I did is to import it as a module in my project and when i tried to sync project this error appeared
所以我做的是将它作为模块导入我的项目中,当我尝试同步项目时出现这个错误
Could not get unknown property 'ANDROID_SUPPORT_VERSION' for project ':demo' of type org.gradle.api.Project.
无法为org.gradle.api.Project类型的项目':demo'获取未知属性'ANDROID_SUPPORT_VERSION'。
Here is where the problem occurs in the Gradle file: 以下是Gradle文件中出现问题的位置:
dependencies {
compile project(':library')
compile "com.android.support:appcompat-v7:${project.ANDROID_SUPPORT_VERSION}@aar"
}
Could not get unknown property 'ANDROID_SUPPORT_VERSION' for project ':demo' of type org.gradle.api.Project.
无法为org.gradle.api.Project类型的项目':demo'获取未知属性'ANDROID_SUPPORT_VERSION'。
It's because your project didn't have the ANDROID_SUPPORT_VERSION
property in your gradle.properties
which is not getting imported to your project. 这是因为您的项目在
gradle.properties
中没有ANDROID_SUPPORT_VERSION
属性,而该属性未导入到您的项目中。 you need to add the property. 你需要添加属性。
Here is the MrVector gradle.properties
that you probably need to add to your project: 以下是您可能需要添加到项目中的MrVector
gradle.properties
:
VERSION_NAME=0.2.0
VERSION_CODE=2
GROUP=com.telly
POM_NAME=Mr. Vector Library
POM_ARTIFACT_ID=mrvector
POM_PACKAGING=aar
POM_DESCRIPTION=Mr. Vector (VectorDrawableCompat): A 7+ backport of VectorDrawable
POM_URL=https://github.com/telly/MrVector
POM_SCM_URL=https://github.com/telly/MrVector
POM_SCM_CONNECTION=scm:git@github.com:telly/MrVector.git
POM_SCM_DEV_CONNECTION=scm:git@github.com:telly/MrVector.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=eveliotc
POM_DEVELOPER_NAME=Evelio Tarazona Caceres
ANDROID_BUILD_MIN_SDK_VERSION=7
ANDROID_BUILD_TARGET_SDK_VERSION=21
ANDROID_BUILD_SDK_VERSION=21
ANDROID_BUILD_TOOLS_VERSION=21.1.2
ANDROID_SUPPORT_VERSION=21.0.3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.