gpt4 book ai didi

android - 无法将 BottomBar 添加到 Android Studio

转载 作者:行者123 更新时间:2023-12-03 04:32:03 24 4
gpt4 key购买 nike

我正在尝试将 BottomBar(第 3 方库)作为模块添加到我的 android studio 项目中。我收到错误 Error: (4, 0) Cannot get property 'compileSdkVersion' on extra properties extension 因为它不存在并且指向 build.gradle 文件。我不确定出了什么问题。感谢任何帮助。

底栏:
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
}

最佳答案

算了,我想通了。我不需要将其作为模块导入,只需将其添加为依赖项即可。

关于android - 无法将 BottomBar 添加到 Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37578670/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com