unityでアンドロイドアプリを作っているのですが、aabのビルドが上手くいきません。
エラーは以下の通りです。
What went wrong: A problem occurred evaluating project ':launcher'. Failed to apply plugin 'com.android.internal.application'. Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of the following options: - changing the IDE settings. - changing the JAVA_HOME environment variable. - changing `org.gradle.java.home` in `gradle.properties`. Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org BUILD FAILED in 2s UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
このような感じです。
launcher内のエラーヶ所は
apply plugin: 'com.android.application'
です。
android studioの設定変更はこちら
を参考に変更しました。
JAVA_HOMEの設定はこちらを参考に変更しました。
gradle.propertiesの設定は調べても分からなかったので手を加えてません。
上記のサイトを参考にJdk11に変更したのですが、同じエラーが出てしまいます。
また、そもそもunityはJava1.8しか互換性が無いと伺ったので、なぜJava11を要求しているのかがわからないです。Java11に合わせるべきなのか、それともJava1.8に合わせるべきなのかというところも伺いたいです。
あなたの回答
tips
プレビュー