CODEDRAGON ㆍDevelopment/Android
에러 메시지
update시 자동으로 교제되지만 참조하고 있는 모듈에 문제가 있는 경우에는 관련 설정 항목을 직접 수정해 주어야 합니다.
아래의 해결방법으로 해결하시기 바랍니다.
Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation' and 'androidTestApi'.
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation' and 'androidTestApi'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configuration 'androidTestApi' is obsolete and has been replaced with 'androidTestImplementation'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html http://d.android.com/r/tools/update-dependency-configurations.html |
|
해결방법 정리
build.gradle (Module: app) 파일의 아래 키워드를 변경합니다.
변경 전 |
변경 후 |
androidTestCompile |
androidTestImplementation |
testCompile |
testImplementation |
testApi |
testImplementation |
androidTestApi |
androidTestImplementation |
compile |
implementation |
해결방법 - 'androidTestCompile'
Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation' and 'androidTestApi'.
build.gradle (Module: app) 파일의
testCompile을 testImplementation 로 변경합니다. >> 우측 상단의 [Sync now] 링크를 클릭하여 동기화해주면 해결됩니다.
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:23.4.0' testCompile 'junit:junit:4.12' }
|
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:23.4.0' testCompile 'junit:junit:4.12' }
|
해결방법 - 'testCompile'
Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
testCompile을 testImplementation 로 변경합니다. >> 우측 상단의 [Sync now] 링크를 클릭하여 동기화해주면 해결됩니다.
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:26.+' } |
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testImplementation 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:26.+' } |
해결방법 1- 'compile'
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
compile을 implementation으로 변경합니다. >> 우측 상단의 [Sync now] 링크를 클릭하여 동기화해주면 해결됩니다.
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:26.+' } |
dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' implementation 'com.android.support:appcompat-v7:26.+' } |
해결방법 2- 'compile'
해결방법 1- 'compile' 로 키워드를 변경해 준 후에도 계속 경고 메시지가 발생할 경우 해결방법입니다.
build.gradle(Project) 그래들에 추가한 모듈의 버전을 업그레드 해주면 됩니다.
io.realm:realm-gradle-plugin:2.2.0 모듈의 버전을 5.4.1 로 변경합니다.
com.google.gms:google-services:3.1.0 모듈의 버전을 3.2.1 로 변경합니다.
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html |
buildscript { ext.kotlin_version = '1.2.71'
repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.0' classpath 'io.realm:realm-gradle-plugin:2.2.0' classpath 'com.google.gms:google-services:3.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
|
buildscript { ext.kotlin_version = '1.2.71'
repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.0' classpath 'io.realm:realm-gradle-plugin:5.4.1' classpath 'com.google.gms:google-services:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
|
Dependency configurations
http://d.android.com/r/tools/update-dependency-configurations.html
Implementation Vs Api
Implementation Vs Api in Android Gradle plugin 3.0
https://medium.com/mindorks/implementation-vs-api-in-gradle-3-0-494c817a6fa
Implementation VS Api in Android Gradle Plugin - 번역
https://sikeeoh.github.io/2017/08/28/implementation-vs-api-android-gradle-plugin-3/
'Development > Android' 카테고리의 다른 글
인텐트의 구성 요소 (0) | 2019.02.07 |
---|---|
The specified Android SDK Build Tools version (xx.x.x) is ignored, as it is below the minimum supported version (xx.x.x) for Android Gradle Plugin x.x.x. Android SDK Build Tools xx.x.x will be used. (0) | 2019.02.04 |
Google Map API 사용하기 위한 절차 (Android) (0) | 2019.02.02 |
네이티브 앱(Native App) (0) | 2019.01.27 |
Could not find com.android.tools.build:gradle:x.x.x. (0) | 2019.01.24 |