Exception: JNI: Init'd AndroidJavaClass with null ptr!
Nobody has claimed this yet.
- Dominant language
- Objective-C++
- Stars
- 2.7k
- Forks
- 734
- Avg merge
- 11h 39m
- Merged PRs (30d)
- 1
Description
I copy the project, open the example, but when i hit play, gives me this error:
JNI: Init'd AndroidJavaClass with null ptr!
UnityEngine.AndroidJavaClass..ctor (IntPtr jclass) (at C:/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:622)
UnityEngine.AndroidJavaObject.get_JavaLangClass () (at C:/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:600)
UnityEngine.AndroidJavaObject.FindClass (System.String name) (at C:/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:591)
UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:193)
UnityEngine.AndroidJavaObject..ctor (System.String className, System.Object[] args) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/AndroidJavaBindings.gen.cs:18)
WebViewObject.Init (System.Action1 cb, Boolean transparent, System.String ua, System.Action1 err, System.Action`1 ld, Boolean enableWKWebView) (at Assets/Plugins/WebViewObject.cs:298)
SampleWebView+c__Iterator0.MoveNext () (at Assets/Scripts/SampleWebView.cs:33)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure from the example and inspect Assets/Plugins/WebViewObject.cs at line 298, where WebViewObject.Init is called, together with Assets/Scripts/SampleWebView.cs at line 33. Compare the example's Unity and Android setup with the conditions required by that initialization; done means the example starts without the reported null-pointer exception or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, unity
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100