Various configuration problems encountered when upgrading android studio to the latest version

android IED upgraded from 3.1.2 to the latest 3.3

androidStudio latest version

The latest version 4.10.1 used by gradle

The latest configuration of gradle

ERROR: Could not set unknown property 'enforceUniquePackageName' for object of type 
com.android.build.gradle.LibraryExtension.
Open File
高版本不允许有 enforceUniquePackageName	
根据提示点击 Open File 注释掉  enforceUniquePackageName = false 
try again 然后
WARNING: 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
Affected Modules: xxxx,xxxxx【出问题的模块】
WARNING: Configuration 'androidTestCompile' 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
Affected Modules: xxxx,xxxxx【出问题的模块】
根据提示 2018 年后不允许使用 compile 和 androidTestCompile 替换相应引用方式 到对应的模块下将原有的 
compile --》 api,
androidTestCompile --》 androidTestImplementation
如果有多个请将多个替换。示例如下:
older
compile fileTree(include: '*.jar', dir: 'libs')
androidTestCompile('xxxxxx')
new
api fileTree(include: '*.jar', dir: 'libs')
androidTestImplementation('xxxxxx')

Sync Now resyncs after the replacement is complete
Most of the things are fine, and you can use the latest environment to write code.

Guess you like

Origin blog.csdn.net/ff_hh/article/details/88553583