Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
crash on android java.lang.CloneNotSupportedException: Class doesn't implement Cloneable - Gideros Forum

crash on android java.lang.CloneNotSupportedException: Class doesn't implement Cloneable

hgvyas123hgvyas123 Guru
edited August 2012 in General questions
hi i am trying my hand on android plugin but dont know why it likes only on my lg optimus and not like my friend's optimus balck and galaxy ace plus. it gives crash on both of this device everytime and running fine on my device everytime. i am attaching log.txt and apk (plz change the extention from zip to apk) and help me to solve this.




  • ScouserScouser Guru
    edited August 2012
    It would appear from the attached file that there are 3 plugins associated with the app., all of which appear to be used.

    It may be a bit more help if you output some debug info between each loadLibrary(...)
    // DEBUG HERE FOR WebView
    // DEBUG HERE FOR LeadBolt
    You really need to plug the device into your PC and capture the full logcat output to see where the problem is happening. It appears that the exception occurred before 11:45:23.992 so the log.txt you have supplied is not enough.
  • @Scouser

    thnx for reply i guess so system.loadLibrary doesnt have any issue otherwise it is supposed to crash at the start currently it is giving crash when i click on any button i had tried to debug this in c++ it is able to run every line untill return true and not able to run the first line of java code so i am confused where is the actual prob and on top of that this apk is able to run on my lg p500 without any issue

    may be issue of armv7 ? but doesnt ndk is building for both arch atleast it is the what i am seeing in my libs folder

  • here's the project to download


    and apk is on first post

    sorry dont know any other sites to upload


  • hgvyas123hgvyas123 Guru
    edited August 2012

    then how it can work on my device i am really confused could you look at the project plz
  • ScouserScouser Guru
    edited August 2012
    @hgvyas123: I can recreate this problem on my phone, but it doesn't happen if you comment out the line
    from ElasticJointsActivity.java.

    I think this is a job for @atilim. I don't know how Gideros works internally so I could only make guesses from here.

    My guess would be that during the onDrawFrame() the lua interpreter is called and something within the lua (maybe one of your plugins, maybe not) is causing this problem.

    Maybe something is still being processed by the AdMob or LeadBolt libraries and multiple calls are getting through.

    I would start with your plugins. I think there is some sort of conflict between your plugin & the Ad libraries which only manifests itself when you call one of the library functions.

    Having commented out all of the java code for the AdMob and LeadBold, I put lots of debug in these functions and the problem persists without any of the debug so it is looking more likely there is a problem with your plugin to java bridge.
  • Further exploration shows that it is definately your plugins.

    You totally ignore the fact that (*JVM).GetEnv fails and still proceed as though it is all OK.
  • obviously it is my plugin after all it is my first try.

    for the info it is also giving crash on htc aria :( so i am now assuming that it is only my p500 ( the real smart phone :D ) that can run my plugin without any issue.


  • hgvyas123hgvyas123 Guru
    edited August 2012
    sorry in order to keep this post in unanswered i have to reject answer.

  • ScouserScouser Guru
    edited August 2012 Accepted Answer
    Ok try this. I have only modified one of the plugin files but you should be able to use the same code for all 3 of them.

    Notice the code is a bit shorter, and also notice the line where the error was.
    (*env).CallObjectMethod(cls, method,env->NewStringUTF(adMobId));
    has been replaced with
    ENV->CallStaticVoidMethod(cls, method,ENV->NewStringUTF(adMobId));
    Your java functions are static functions with no return values so you must call a static void method. I don't know enough about the JNI to know what this was actually doing to cause the problem but it appears to now work without crashing.

    I also made the java environment accessible to the whole file without having to call JVM->GetEnv in every function.

  • cool i will try it soon

Sign In or Register to comment.