Open hitorijanai opened 9 years ago
Sorry it seems the fault is mine.
I didn't set Script Execution Order of CrittercismInit to higher level.
Anything we could fix documentation-wise to help prevent the issue you ran into? Thanks!
After reviewing the problem, it turned out it was indeed SetValue
that causes the exception. Script Execution Order only matters if I do something with crittercism on Awake()
, before crittercism get initialised. Please look into this matter
@dshirley please help :tired_face:
AndroidJavaException: java.lang.NoSuchMethodError: no method with name='put' signature='(Ljava/lang/String;Ljava/lang/String;)V' in class Lorg/json/JSONObject;
1
at UnityEngine.AndroidJNISafe.CheckException(Unknown Source)
2
at UnityEngine.AndroidJNISafe.GetMethodID(Unknown Source)
3
at UnityEngine._AndroidJNIHelper.GetMethodID(Unknown Source)
4
at UnityEngine.AndroidJNIHelper.GetMethodID(Unknown Source)
5
at UnityEngine._AndroidJNIHelper.GetMethodID(Unknown Source)
6
at UnityEngine.AndroidJNIHelper.GetMethodID(Unknown Source)
7
at UnityEngine.AndroidJavaObject._Call(Unknown Source)
8
at UnityEngine.AndroidJavaObject.Call(Unknown Source)
9
at CrittercismAndroid.SetValue(Unknown Source)
10
at CrittercismWrapper.SetValue(Unknown Source)
@hitorijanai I don't have spare cycles to fix this right now. It looks like the SetValue function is missing an initialization check:
if (!isInitialized) {
return;
}
Feel free to add it there. I"m happy to merge a pull request if you've tried it and tested it.
Alternatively you could use Crittercism.setMetadata(String[], String[]). It's a more cumbersome interface but I think it would help you work around the issue.
http://community.crittercism.com/questions/1028/getting-nosuchmethoderror-in-crittercismandroidset.html
I'm getting this error when calling
SetValue