jstring has wrong type: android.location.Location

Hi,

after upgrade to Unity 5.5 (64b) application fails during GPS init with message in the log:

art/runtime/java_vm_ext.cc:448] JNI DETECTED ERROR IN APPLICATION: jstring has wrong type: android.location.Location

Do you have any suggestion how to fix it?

2 Likes

Workaround: downgrade Unity version and Make a backup first!!!
Reproducible: 5.5.0f1, 5.5.0f2, 5.5.0f3, 5.5.0p1, 5.5.0p2, 5.6.0a5, 5.6.0b1

1 Like

Yes downgrade helped. Works like a charm in 5.2.1f.

faced similar error. downgrading isn’t feasible since I am using Vuforia plugin and there are syntax variations too.

I used the sample project by vuforia for unity to implement user defined targets based AR. I added GPS functionality to it using the attached script. The app is crashing after a few seconds. I, then, used adb logcat and printed it in a log file and now I am getting this error:
JNI DETECTED ERROR IN APPLICATION: jstring has wrong type: android.location.Location

Please see the attached script file: location.cs
and also the log file : log807pm_17feb.txt (specifically line number: 26845) that is where the error starts.

the idea I am working on has been taken from here; Location-Based-Markerless-Augmented-Reality/Assets/DetectLocation.cs at master · hynra/Location-Based-Markerless-Augmented-Reality · GitHub

I am a beginner in unity and C#. Please suggest any solution to this problem.

2963471–220041–log807pm_17feb.txt (1.55 MB)
2963471–220042–location.cs (2.1 KB)