Android Studio运行错误(api过时)

Android Studio会更新,而有些项目写的比较久了,所以有时会出现一些错误,需要我们手动改下build.gradle文件中的代码

首先说下这次的错误:

Configuration 'compile' is obsolete and has been replaced with 'implementati 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 
androidTestCompile改成androidTestImplementation 
testCompile 改成testImplementation

 

引用:https://blog.csdn.net/Song_74110/article/details/80387307

你可能感兴趣的:(Android,studio)