iBicha / EmojiTexture

A Unity plugin to render Emojis ☺ ❤ 🍆 🍑 to a texture
Other
62 stars 9 forks source link

Android Api level 31 fix? #28

Open varelaj opened 2 years ago

varelaj commented 2 years ago

It works fine in api level 30 but in 31 it crashes, and Google requires Api level 31 from November. Any help?

iBicha commented 2 years ago

Please share more details (Unity version, package version, stack trace)

varelaj commented 2 years ago

On Unity 2019.4.22f1 (but I know is happening with any Unity) with Target API Level 31 it crashes on any Android 12 device. The same thing with Target API Level 30 works just fine. In the LOGCAT you cannot see any error.

jevan-smith commented 1 year ago

Having the same issue on devices using Android 12 or above.

Error:

java.lang.NoSuchMethodError · no non-static method "Ljava/nio/DirectByteBuffer;.(JI)V"

Stacktrace:

Native Method com.unity3d.player.UnityPlayer.nativeRender() Unknown Source com.unity3d.player.UnityPlayer.access$300() Unknown Source:95 com.unity3d.player.UnityPlayer$e$1.handleMessage() Handler.java:102 ndroid.os.Handler.dispatchMessage() Looper.java:226 ndroid.os.Looper.loopOnce() Looper.java:313 ndroid.os.Looper.loop() Unknown Source:20 com.unity3d.player.UnityPlayer$e.run() unknown UnityEngine.AndroidJNISafe.CheckException() System.IntPtr obj, System.String name, System.String sig UnityEngine.AndroidJNISafe.GetMethodID() System.IntPtr jclass, System.String signature UnityEngine._AndroidJNIHelper.GetConstructorID() System.String className, System.Object[] args UnityEngine.AndroidJavaObject._AndroidJavaObject() System.String text, System.Int32 width, System.Int32 height iBicha.EmojiTexture..ctor() TMPro.TMP_Text tmp_Text iBicha.TMPro.TMProEmojiAsset.HookTMP()

AAAYaKo commented 1 year ago

I suggest you test my fix