ある日突然、AndroidStudioでビルドをしようとすると、こんなメッセージが出てビルドできない。
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 は deprecated になり、implementation コマンドに変更されました。
以下のように書き換える必要があります。
dependencies {
//compile files('../../Ref/Java/android-support-v4.jar')
//compile 'com.android.support:support-v4:18.0.0'
implementation 'com.android.support:support-v4:18.0.0'
//compile files('../../Ref/Java/foo.jar')
implementation fileTree(dir: '../../Ref/Java', include: 'foo.jar')
//compile files('../../Ref/Java/bar.jar')
implementation fileTree(dir: '../../Ref/Java', include: 'bar.jar')
}
0 件のコメント:
コメントを投稿