我试图将BottomBar(第三方lib)作为模块添加到我的android studio项目中。我收到错误错误:(4,0)无法获取属性' compileSdkVersion'在额外的属性扩展,因为它不存在,它指向build.gradle文件。我不确定是什么错。感谢任何帮助。
BottomBar: https://github.com/roughike/BottomBar/blob/master/README.md#common-problems-and-solutions
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "com.example.bottombar.sample"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':bottom-bar')
compile 'com.android.support:appcompat-v7:' + rootProject.ext.supportLibraryVersion
compile 'com.android.support:design:' + rootProject.ext.supportLibraryVersion
testCompile 'junit:junit:' + rootProject.ext.junitVersion
}
答案 0 :(得分:0)
算了吧,我想通了。我不需要将其作为模块导入,只需将其添加为依赖项。