Mihail5412 / Unity-Android-Files-Opener

Allows your unity android application to open files on local drive
MIT License
18 stars 4 forks source link

Exception: Field currentActivity or type signature not found #2

Closed rzjorge21 closed 4 years ago

rzjorge21 commented 4 years ago

Hi, i'm getting this error:

Exception: Field currentActivity or type signature not found

UnityEngine._AndroidJNIHelper.GetFieldID (System.IntPtr jclass, System.String fieldName, System.String signature, System.Boolean isStatic) (at <276f2981b14b4cff9d7381915070a7a8>:0) UnityEngine.AndroidJNIHelper.GetFieldID (System.IntPtr javaClass, System.String fieldName, System.String signature, System.Boolean isStatic) (at <276f2981b14b4cff9d7381915070a7a8>:0) UnityEngine._AndroidJNIHelper.GetFieldID[ReturnType] (System.IntPtr jclass, System.String fieldName, System.Boolean isStatic) (at <276f2981b14b4cff9d7381915070a7a8>:0) UnityEngine.AndroidJNIHelper.GetFieldID[FieldType] (System.IntPtr jclass, System.String fieldName, System.Boolean isStatic) (at <276f2981b14b4cff9d7381915070a7a8>:0) UnityEngine.AndroidJavaObject._GetStatic[FieldType] (System.String fieldName) (at <276f2981b14b4cff9d7381915070a7a8>:0) UnityEngine.AndroidJavaObject.GetStatic[FieldType] (System.String fieldName) (at <276f2981b14b4cff9d7381915070a7a8>:0) UnityAndroidOpenUrl.AndroidOpenUrl.OpenFile (System.String url, System.String dataType) (at Assets/Scripts/AndroidOpenUrl.cs:33) DemoScript+<SaveTemplatePDF>d__6.MoveNext () (at Assets/Demo/Scripts/DemoScript.cs:40) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <94c5f4c38cdc42d2b006f8badef04394>:0)

and the error is on AndroidOpenUrl.cs:33 AndroidJavaObject currentActivity = clazz.GetStatic<AndroidJavaObject>("currentActivity");

rzjorge21 commented 4 years ago

In android works correctly.