關於升級到Android Studio3.2版本的註意事項
1、默認最低的Build Tools version 為 28.0.2
2、如果程序中使用了kotlin插件,需要將kotlin插件的最低版本號改為1.2.51
3、如果在gradle.properties文件中加入了android.overridePathCheck=true 設置,現在是不支持的要刪除或註釋掉
編譯器給出的提示原文:
1、The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.2) for Android Gradle Plugin 3.2.0.
To suppress this warning, remove "buildToolsVersion ‘27.0.3‘" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
2、The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project ‘baisonpda3‘ is using version 1.2.41.
3、The option setting ‘android.overridePathCheck=true‘ is experimental and unsupported.
The current default is ‘false‘
另外一種情況:(在3.2的介紹說明也有提到,可能需要ladder的問題;或者也是剛發布不就有些事情還沒溝通完全,需要時間)
1、如果在升級時出現kotlin下載超時,說明網絡被限制;可能是電腦的防火墻,公司的保護傘,也有可能是長城的問題了,這時就只有使用代理。
2、或者你發現,直接使用瀏覽器可以進入maven信息,那麽這就可能是as工具的問題了,
但可以通過在程序根目錄的build.gradle文件裏加入jcenter(){url "http://jcenter.bintray.com/"}
3、也有可能是你的kotlin版本使用過高,訪問被受限如報錯:
Caused by: org.gradle.api.resources.ResourceException: Could not get resource ‘https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.60/kotlin-gradle-plugin-1.2.60.jar‘.
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to d29vzk4ow07wi7.cloudfront.net:443 failed: Connection timed out: connect
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
也可以通過步驟2的配置jcenter(){url "http://jcenter.bintray.com/"}
成功獲取
關於升級到Android Studio3.2版本的註意事項