yasirkula / UnityNativeShare

A Unity plugin to natively share files (images, videos, documents, etc.) and/or plain text on Android & iOS
MIT License
891 stars 131 forks source link

NativeShare won't do anything on Android release build only in development build #96

Closed gh0sTedBuddy closed 3 years ago

gh0sTedBuddy commented 3 years ago

Description of the bug

When i press the button to start the share process on android, nothing happens. it only works when i check "development build".

I tried to manually change Android manifest file but then i get the error for duplicate entries.

Platform specs

Additional info

LOGCAT:

11-30 16:21:35.086 21431 21448 E Unity : AndroidJavaException: java.lang.ClassNotFoundException: com.yasirkula.unity.NativeShare 11-30 16:21:35.086 21431 21448 E Unity : java.lang.ClassNotFoundException: com.yasirkula.unity.NativeShare 11-30 16:21:35.086 21431 21448 E Unity : at java.lang.Class.classForName(Native Method) 11-30 16:21:35.086 21431 21448 E Unity : at java.lang.Class.forName(Class.java:453) 11-30 16:21:35.086 21431 21448 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method) 11-30 16:21:35.086 21431 21448 E Unity : at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) 11-30 16:21:35.086 21431 21448 E Unity : at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95) 11-30 16:21:35.086 21431 21448 E Unity : at android.os.Handler.dispatchMessage(Handler.java:102) 11-30 16:21:35.086 21431 21448 E Unity : at android.os.Looper.loop(Looper.java:164) 11-30 16:21:35.086 21431 21448 E Unity : at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) 11-30 16:21:35.086 21431 21448 E Unity : Caused by: java.lang.ClassNotFoundException: Didn't find class "com.yasirkula.unity.NativeShare" on path: DexPathList[[zip file "/data/app/GAME_PACKAGE_NAME==/base.apk"],nativeLibraryDirectories=[/data/app/GAME_PACKAGE_NAME==/lib/arm64, /data/app/GAME_PACKAGE_NAME==/base.apk!/lib/arm64-v8a,

yasirkula commented 3 years ago

Please see: https://github.com/yasirkula/UnityNativeShare#faq

gh0sTedBuddy commented 3 years ago

@yasirkula can i somehow buy you a beer or something? thank you very much... i'm a bit embarrassed that i didn't saw this point in the faq... i really read everything.... fuck 👍

yasirkula commented 3 years ago

You can support me on itch.io but don't feel obliged to 😃

mazharali commented 3 years ago

I have the same error "AndroidJavaException: java.lang.ClassNotFoundException: com.yasirkula.unity.NativeShare" and I am not using ProGuard, what should I do.

yasirkula commented 3 years ago

A plugin you are using might somehow be enabling Proguard. Even though you aren't using Proguard, enable "Custom Proguard File" option in Player Settings anyways and add the line in FAQ to that file.