[英]INFO: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'
I have downloaded a Camera app source code from GitHub.我从 GitHub 下载了一个相机应用程序源代码。 when I sync the project It will show 3 error.
当我同步项目时,它会显示 3 错误。 and also source code contains some dependency which I don't know how to replace.
并且源代码包含一些我不知道如何替换的依赖项。 The main problem is androidX.
主要问题是androidX。
error 1错误 1
ERROR: Failed to resolve: com.github.ittianyu:BottomNavigationViewEx:1.1.9
Show in Project Structure dialog
Affected Modules: app
error 2错误 2
ERROR: Failed to resolve: com.github.eschao:android-ElasticListView:v1.0
Show in Project Structure dialog
Affected Modules: app
error 3错误 3
INFO: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Affected Modules: app
build.gradle(Module: app) file - build.gradle(模块:app)文件 -
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.cameraapplication"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
//Extra Dependency
testImplementation 'junit:junit:4.12'
//Design library for Coordinator Layout and Toolbars
implementation 'com.android.support:design:28.0.0'
//ExifInterface support
implementation 'com.android.support:exifinterface:28.0.0'
//design library for Coordinator Layout
implementation 'com.android.support:design:28.0.0'
//Exo Player
implementation 'com.google.android.exoplayer:exoplayer:2.10.5'
//cardview
implementation 'com.android.support:cardview-v7:28.0.0'
//recyclerview
implementation 'com.android.support:recyclerview-v7:28.0.0'
//BottomNavigationViewEx library
implementation 'com.github.ittianyu:BottomNavigationViewEx:1.1.9'
//Circle ImageView
implementation 'de.hdodenhof:circleimageview:2.2.0'
//elastic header
implementation 'com.github.eschao:android-ElasticListView:v1.0'
//material dialogs
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
//glide
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation files('libs/aspectjrt-1.7.3 (1).jar')
//Universal image loader
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile files('libs/aspectjrt-1.7.3 (1).jar')
}
build.gradle(project: CameraApplication) file - build.gradle(project: CameraApplication) 文件 -
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
please tell me the solution THANK YOU IN ADVANCE请告诉我解决方案 提前谢谢
ERROR: Failed to resolve: com.github.ittianyu:BottomNavigationViewEx:1.1.9
错误:无法解决:com.github.ittianyu:BottomNavigationViewEx:1.1.9
ERROR: Failed to resolve: com.github.eschao:android-ElasticListView:v1.0错误:无法解决:com.github.eschao:android-ElasticListView:v1.0
In the top level file in the allprojects
block you have to add the jitpack repo:在
allprojects
块的顶级文件中,您必须添加 jitpack 存储库:
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
INFO: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
信息:配置“编译”已过时,已替换为“实施”和“API”。
Remove this line删除此行
//compile files('libs/aspectjrt-1.7.3 (1).jar')
since you are already using implementation fileTree(dir: 'libs', include: ['*.jar'])
因为您已经在使用
implementation fileTree(dir: 'libs', include: ['*.jar'])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.