Resurrecting this. I struggled with the same error for a full day until I stumbled on this thread.
I experienced the same error, and it was due to having “public static String” method in Cocos2dxHelpder.java:
public static String getPriceLabel()
I was calling this with:
String ret = "";
if(JniHelper::getStaticMethodInfo(t, "org/cocos2dx/lib/Cocos2dxHelper", "getPriceLabel", "()Ljava/lang/String;"))
jstring str = (jstring)t.env->CallStaticObjectMethod(t.classID, t.methodID);
ret = JniHelper::jstring2string(str);
This caused the:
FATAL EXCEPTION: GLThread 8
java.lang.CloneNotSupportedException: Class doesn’t implement Cloneable
To fix this, the “public static String” needs to be changed to FINAL:
“public static FINAL String”.
public static final String getPriceLabel()
This fixed the problem. Had to register to the site and share this.. since this was annoying fix for non-pro Java guy