UnityNativeShare icon indicating copy to clipboard operation
UnityNativeShare copied to clipboard

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

Open ghosTedBuddy opened this issue 6 years ago • 5 comments

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

  • Unity version: e.g. 2020.1.2f1
  • Platform: Android
  • Device: Google Nexus 5x, Android 8.1.0
  • How did you download the plugin: GitHub, manifest.json in Packages directory

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,

ghosTedBuddy avatar Nov 30 '20 15:11 ghosTedBuddy

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

yasirkula avatar Nov 30 '20 16:11 yasirkula

@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 👍

ghosTedBuddy avatar Nov 30 '20 23:11 ghosTedBuddy

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

yasirkula avatar Dec 01 '20 07:12 yasirkula

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

mazharali avatar Apr 09 '21 17:04 mazharali

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.

yasirkula avatar Apr 09 '21 17:04 yasirkula