When attempting to build an Android App with a single extended Activity (that works in 2022) I’m getting unityLibrary:compileDebugJavaWithJavac FAILED
followed by Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\myproj\main\OverrideExample.java:5: error: cannot find symbol import com.unity3d.player.UnityPlayerActivity;
followed by C:\Program Files\Unity\Hub\Editor\6000.0.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\Program Files\Unity\Hub\Editor\6000.0.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-8.4.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleDebug"
I’m not sure how to diagnose the error. The API level is set to 34, and I’ve successfully created an app in Android Studio for 34 and that seems to have some odd differences. E.g. the sourceCompatibility & targetCompatibility are set to JavaVersion.VERSION_17 in the Unity mainTemplate.gradle but are JavaVersion.VERSION_1_8 in the Android Studio project. I’m not familiar with Android dev so I’m not sure what the setting should be, just that they’re different and the Android Studio project works.
Any thoughts, recommendations, etc. welcome.