ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [안드로이드] 안드로이드 스튜디오 3.1 Configuration~ 경고 제거법
    Development/Android 2018. 6. 18. 02:10
    반응형

    안드로이드 스튜디오 업데이트 후 못보던 경고 메시지가 떴습니다.






    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 '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


    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



    에러를 해석해보면 대부분 "더 이상 A는 구현되지 않으니 B를 사용해라"는 뜻입니다.


    build.gradle(app)에서 그대로 해주면 됩니다.


    저는 아래처럼 되어있네요.


    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'
    })

    //andorid
    compile 'com.android.support:support-v4:24.2.0'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:24.2.0'
    testCompile 'junit:junit:4.12'
    }



    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

    => androidTestCompile 를 androidTestImplementation로 바꾸어 줍니다.


    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

    => compile을 implementation로 바꾸어 줍니다.


    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 '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

    => 이것도 두번째 에러를 해결하면 자연스럽게 해결되더군요..


    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

    => testCompile를 testImplementation로 바꾸어 줍니다.



    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
    })

    //andorid
    implementation 'com.android.support:support-v4:24.2.0'
    implementation 'com.android.support:appcompat-v7:25.3.1'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:24.2.0'
    testImplementation 'junit:junit:4.12'
    }
    짠~ 이렇게 설정후 Sync를 누르니 모든 에러가 없어졌습니다.

    끝!






    반응형

    댓글

Designed by Tistory.