GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ClassNotFoundException: com.yasirkula.unity.NativeFilePickerPermissionReceiver · Issue #31 · yasirkula/UnityNativeFilePicker

ClassNotFoundException: com.yasirkula.unity.NativeFilePickerPermissionReceiver #31

New issue
Copy link
New issue
Copy link
Closed
Closed
ClassNotFoundException: com.yasirkula.unity.NativeFilePickerPermissionReceiver#31
Copy link
Labels
bugSomething isn't working

Description

@jakedowns
jakedowns
opened on Dec 2, 2022
Issue body actions

Description of the bug

I tried using the Asset Store version of the plugin, and downloading from this repo.

When I try to trigger the file-picker on Android, I get the following error:

public void promptUserFilePicker()
    {
#if UNITY_ANDROID
        // Use MIMEs on Android
        string[] fileTypes = new string[] { "video/*" };
#else
		// Use UTIs on iOS
		string[] fileTypes = new string[] { "public.movie" };
#endif

        // Pick image(s) and/or video(s)
        NativeFilePicker.Permission permission = NativeFilePicker.PickFile((path) =>
        {
            if (path == null)
                Debug.Log("Operation cancelled");
            else
            {
                Debug.Log("Picked file: " + path);
                Open(path);
            }
        }, fileTypes);

        _ShowAndroidToastMessage($"Permission result: {permission}");
        Debug.Log("Permission result: " + permission);
    }

Reproduction steps

If possible, providing reproduction steps would be very helpful while pinpointing the issue. You can also post screenshots if you think they would be helpful.

Platform specs

Please provide the following info if this is a Unity 3D repository.

  • Unity version: 2021.3.11f1*
  • Platform: Android
  • Device: Samsung Galaxy S10 5G UW, SM-G981V, Android 12, One UI 4.1
  • How did you download the plugin: tried Asset Store, and Github
12-01 18:12:46.955: E/Unity(19439): AndroidJavaException: java.lang.ClassNotFoundException: com.yasirkula.unity.NativeFilePickerPermissionReceiver
12-01 18:12:46.955: E/Unity(19439): java.lang.ClassNotFoundException: com.yasirkula.unity.NativeFilePickerPermissionReceiver
12-01 18:12:46.955: E/Unity(19439): 	at java.lang.Class.classForName(Native Method)
12-01 18:12:46.955: E/Unity(19439): 	at java.lang.Class.forName(Class.java:454)
12-01 18:12:46.955: E/Unity(19439): 	at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
12-01 18:12:46.955: E/Unity(19439): 	at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
12-01 18:12:46.955: E/Unity(19439): 	at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
12-01 18:12:46.955: E/Unity(19439): 	at android.os.Handler.dispatchMessage(Handler.java:102)
12-01 18:12:46.955: E/Unity(19439): 	at android.os.Looper.loopOnce(Looper.java:226)
12-01 18:12:46.955: E/Unity(19439): 	at android.os.Looper.loop(Looper.java:313)
12-01 18:12:46.955: E/Unity(19439): 	at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
12-01 18:12:46.955: E/Unity(19439): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.yasirkula.unity.NativeFilePickerPermissionReceiver" on path: DexPathList[[zip file "/data/app/~~2SxF3bRkAF4GEX2SPy-XmA==/com.jakedowns.nrealDemo-zZGyxBZwlPgN4jf7VdhXbw==/base.apk"],nativeLibraryDirectories=[/data/app/~~2SxF3bRkAF4GEX2SPy-XmA==/com.jakedow

Activity

  1. jakedowns
    added
    bugSomething isn't working
    on Dec 2, 2022
  2. yasirkula commented on Dec 2, 2022

    @yasirkula
    yasirkula
    on Dec 2, 2022
    Owner
    More actions

    Looks like the class is stripped but I don't know how because the embedded Proguard file specifically tells the Gradle compiler not to strip any of the classes. I don't believe you can reproduce this issue on a new project, so something is interfering with Gradle build pipeline in a way I'm unfamiliar with.

  3. jakedowns commented on Dec 2, 2022

    @jakedowns
    jakedowns
    on Dec 2, 2022
    Author
    More actions

    Ah, thank you, that was the issue, added to my Exported proguard-unity.txt

    -keep class com.yasirkula.unity.* { *; }

    Reacted by yasirkula
  4. jakedowns
    closed this as completedon Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.