Gradle Pluginのバージョンを、「3.0.1」⇒「3.2.0」にした時のエラー解決方法

①概要:’android.enableAapt2’は、廃止済みになっているとの事。
エラー内容:
The option ‘android.enableAapt2’ is deprecated and should not be used anymore.
Use ‘android.enableAapt2=true’ to remove this warning.
It will be removed at the end of 2018..

解決方法:
⇒「gradle.properties」で、「android.enableAapt2=false」と記載していたので、「android.enableAapt2=false」を削除し、解決!

②概要:Android SDKのビルドのバージョンで、26.0.2は無視される。その代わりに、27.0.3を使えとの事。
エラー内容:
The specified Android SDK Build Tools version (26.0.2) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.2.0-alpha18.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove “buildToolsVersion ‘26.0.2’” from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Update Build Tools version and sync project
Open File

解決方法:
⇒「Update Build Tools version and sync project」をしたら解決した!

③概要:’compile’は廃止される。その代わりに、「’implementation’」と「’api’」に置き換えろとの事。
エラー内容:
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

解決方法:
⇒「build.gradle」の、「compile」を「implemention」に書き換えたら解決した!

④概要:minSdkは、宣言するべきではない。
エラー内容:
The minSdk version should not be declared in the android manifest file.
You can move the version from the manifest to the defaultConfig in the build.gradle file.

解決方法:
⇒これまで、AndroidManifestに、「defaultConfig」を記載していたが、gradleのファイルに「defaultConfig」を追記して、対応

⑤概要:targetSdkも宣言するべきではない。
The targetSdk version should not be declared in the android manifest file.
You can move the version from the manifest to the defaultConfig in the build.gradle file.

解決方法:
⇒これまで、AndroidManifestに、「defaultConfig」を記載していたが、gradleのファイルに「defaultConfig」を追記して、対応

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です