简体   繁体   English

信息:配置“编译”已过时,已替换为“实施”和“API”

[英]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.

相关问题 如何解决此问题“配置'compile'已过时,并已由'implementation'和'api'代替。” - How to solve this “Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.” 像配置“编译”这样的android studio中的同步依赖项错误已过时,已由“实现”和“ api”替换 - Error in syncing dependency in android studio like Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api' 信息:API 'variant.getMergeResources()' 已过时并已替换为 'variant.getMergeResourcesProvider()' - INFO: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()' API 'variant.getMergeResources()' 已过时并已替换为 'variant.getMergeResourcesProvider()' - API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()' Gradle:解决后无法更改配置“:compile”的依赖项 - Gradle: Cannot change dependencies of configuration ':compile' after it has been resolved 解决后无法更改配置“:compile”的依赖项 - Cannot change dependencies of configuration ':compile' after it has been resolved 为什么 javax.persistence-api 在 spring data jpa starter 中被 jakarta.persistence-api 取代了? - Why has javax.persistence-api been replaced by jakarta.persistence-api in spring data jpa starter? 我的 Eclipse 插件没有找到 JAXB-API 的实现 - Implementation of JAXB-API has not been found by my Eclipse plugin dataOnChange 崩溃已被替换的片段 - dataOnChange crashes fragment that has been replaced spring-eureka-common mvn 依赖被替换了吗? - Has spring-eureka-common mvn dependency been replaced?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM