在Android Studio上添加模块依赖项

时间:2014-10-31 08:57:05

标签: android module android-studio dependencies

我正在创建自己的android项目,我想为我的项目使用第三方库。我从github.Link下载了FoldableLayout

https://github.com/alexvasilkov/FoldableLayout

然后我使用此订单将FoldableLayout中的库文件夹添加到我的项目中:root project -> new -> Module -> Import Exiting Project ->FoldableLayout-master/library作为模块

之后,我将编译项目(':library')添加到app / build.gradle

但我收到了错误

Error:(13, 0) Could not find property 'ANDROID_COMPILE_SDK' on com.android.build.gradle.LibraryExtension_Decorated@f7fcd4e.

我添加了所有屏幕截图

enter image description here     应用程序的项目结构 - >依赖

enter image description here

Root Project's setting.gradle file

enter image description here

app's build.gradle file

enter image description here

1 个答案:

答案 0 :(得分:0)

我自己解决了这个问题:)

问题出在gradle.properties

我需要将这些行添加到myProject / gradle.properties

VERSION_NAME=1.0.3-SNAPSHOT
VERSION_CODE=4
GROUP=com.alexvasilkov

POM_DESCRIPTION=Android widgets to implement folding animation
POM_URL=https://github.com/alexvasilkov/FoldableLayout
POM_SCM_URL=https://github.com/alexvasilkov/FoldableLayout
POM_SCM_CONNECTION=scm:git@github.com:alexvasilkov/FoldableLayout.git
POM_SCM_DEV_CONNECTION=scm:git@github.com:alexvasilkov/FoldableLayout.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=alexvasilkov
POM_DEVELOPER_NAME=Alex Vasilkov

ANDROID_MIN_SDK=14
ANDROID_TARGET_SDK=20
ANDROID_COMPILE_SDK=20
ANDROID_BUILD_TOOLS_VERSION=20.0.0