Summary of gradle problems in Android 2.x upgrade 3.1

Upgraded AndroidStudio to 3.1, gradle was also upgraded, and there were many problems in the corresponding gradle file build.

first

Question 1:

The keywords in dependencies are defined by


compile 'xxxxx' becomes implementation 'xxxxxxxx'



Question 2:

The 27.+ reference method cannot be used, as shown in the figure

implementation 'com.android.support:appcompat-v7:27.+'

A specific version number needs to be formulated uniformly

implementation 'com.android.support:appcompat-v7:27.1.0'

Question 3:

Unknown Failed to resolve: common error

Probably means unresolved common problems

I have been looking for a long time and have not found a solution to the same situation

I accidentally saw a way to delete the .gradle folder, tried it out, and now it’s done.


After deleting the .gradle folder in the project root directory, rebuild the project

There are still many problems in the upgrade process, but I forgot the specific situation, basically it is the reference package, maven library and other problems. If you have any questions, please communicate more

Guess you like

Origin blog.csdn.net/qq_25409587/article/details/80654798