Unity-Technologies / uaal-example

Other
733 stars 233 forks source link

error: cannot find symbol import com.unity3d.player.IUnityPlayerSupport; #91

Open zzm88 opened 9 months ago

zzm88 commented 9 months ago

Task :app:compileDebugJavaWithJavac FAILED C:\Users\zzm88\Documents\uaal-example\NativeAndroidApp\app\src\main\java\com\unity\mynativeapp\SharedClass.java:10: error: cannot find symbol import com.unity3d.player.IUnityPlayerSupport; ^ symbol: class IUnityPlayerSupport location: package com.unity3d.player C:\Users\zzm88\Documents\uaal-example\NativeAndroidApp\app\src\main\java\com\unity\mynativeapp\SharedClass.java:27: error: cannot find symbol UnityPlayer unityPlayer = ((IUnityPlayerSupport) UnityPlayer.currentActivity).getUnityPlayerConnection(); ^ symbol: class IUnityPlayerSupport location: class SharedClass Note: C:\Users\zzm88\Documents\uaal-example\NativeAndroidApp\app\src\main\java\com\unity\mynativeapp\MainActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors

valdezae commented 9 months ago

Did you end up finding a solution?

TumayVarel commented 8 months ago

Same issue here, I'm trying to find a solution however could not come up with one yet.

brokenbug commented 8 months ago

I solved it by updating UnityProject to editor verison 2023.2.3f1 (seems to be a bug in 2023.1.6.f1, so IUnityPlayerSupport is not included in the export build.)

popdika commented 6 months ago

I solved it by updating UnityProject to editor verison 2023.2.3f1 (seems to be a bug in 2023.1.6.f1, so IUnityPlayerSupport is not included in the export build.)

This solved my problem, thanks mate!