Configuration 'compile' is obsolete and has been replaced with 'implementati
Android Studio 3.1.2编译报错报错如下
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
分析,配置里面有些api过时了
例如:
dependencies {
compile fileTree(dir: ‘libs’, include: [‘*.jar’])
androidTestCompile(‘com.android.support.test.espresso2.2.2’, {
exclude group: ‘com.android.support’, module: ‘support-annotations’
})
compile ‘com.android.support25.3.1’
compile ‘com.android.support.constraint1.0.2’
compile ‘com.android.support25.3.1’
compile ‘com.android.support25.3.1’
testCompile ‘junit4.12’
}
1
2
3
4
5
6
7
8
9
10
11
需要改成如下:
compile 改成implementation
androidTestCompile改成androidTestImplementation
testCompile 改成testImplementation
dependencies {
implementation fileTree(dir: ‘libs’, include: [‘*.jar’])
androidTestImplementation(‘com.android.support.test.espresso2.2.2’, {
exclude group: ‘com.android.support’, module: ‘support-annotations’
})
implementation ‘com.android.support25.3.1’
implementation ‘com.android.support.constraint1.0.2’
implementation ‘com.android.support25.3.1’
implementation ‘com.android.support25.3.1’
testImplementation ‘junit4.12’
}
还没有评论,来说两句吧...