Gradle插件最新版本3.21
classpath'com.android.tools.build:gradle:3.2.1'
然后开始填坑之旅
问题一:
Cannotset thevalueofread-only property'outputFile'for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=commonDebug, filters=[]}}of type com.android.build.gradle.internal.api.ApkVariantOutputImpl.Open File
解决方案:
问题二:
Error:All flavors must now belongtoa named flavor dimension. Learn moreathttps://d.android.com/r/tools/flavorDimensions-missing-error-message.html
解决方案:
问题三:
Error:Execution failedfor task':Loan:javaPreCompileCommonDebug'. > Annotation processors must be explicitly declared now. The following dependencieson the compile classpath are foundto contain annotation processor. Pleaseadd themto the annotationProcessor configuration. - butterknife-compiler-8.6.0.jar (com.jakewharton:butterknife-compiler:8.6.0) Alternatively,set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath =truetocontinuewith previous behavior. Note that this optionisdeprecatedand will be removedin thefuture. See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
解决方案:
问题四:
The SourceSet ‘instrumentTest’ is not recognized by the Android Gradle Plugin.
解放方案:
问题五:
找不到引用的库
解决方案:
其他警告