How to solve Exception raised during rendering: java.lang.System.arraycopy([CI[CII)V in Android

So today, while writing an example for the JCG community, I came across the following exception, while trying to add an EditText element to my application:

Exception raised during rendering: java.lang.System.arraycopy([CI[CII)V

Despite the fact that I selected Android 4.4 (API 19) for my application, I noticed that the selected Android API in the Graphical Layout of my XML code was actually wrong:

So, the easy way, I clicked the dropdown to select again my initial option:

Note: the Wear versions don’t support EditText elements and that’s why we got the exception.

And of course, everything was fine after that:



28 thoughts on “How to solve Exception raised during rendering: java.lang.System.arraycopy([CI[CII)V in Android

  1. Wow, that was easy… :-/
    Was struggeling a while whith this now!

    Do you know why the API20: Android L is not selectable, although it is installed in the SDK Manager?
    Or is it included in the 4.4W API?


  2. Hi Christian, thank you for your comment!

    As you probably know, too, Android L will be officially “launched” at late 2014, so till then, it 'll be in a pilot mode.

    Nevertheless, we are actually able to develop “L” apps, under some guidelines.

    To ensure that everything is set properly for “L development”, try following the official guide:

    As you probably noticed, there is also a special reference for System Images, under the “Set Up Hardware and AVDs” paragraph.


  3. Thanks for the information!
    Though I tried out the new API with my project and it worked with the according Emulators, clearly not with ones below L…
    Now I changed back my project to API 19 (project structure + graphical layout API)
    It looks good in the Android Studio design preview, but when I start the emulator (for API 19) it rearranges my controls and it doesn't really fit on the screen (same problem on the phone itself)
    did I f*** up my layout with temporary switching to L?
    I can't see the problem when developing, because the layout looks fine in the Preview…

    You must know in “File > Project Structure” the “Build Tool Version” is still set to “20.0.0” and doesn't allow any other values…
    Do you know this kind of problem?


  4. I have this problem and the only API option I have is 4.4W so how do I add other options? Please help. This is so frustrating!


  5. Hi,
    @Thodoris: hope it's ok to post now and then…?
    which APIs are installed in the SDK Manager and which Android Development Kit is selected under “File > Project Structure”?
    Usually depending on these things you can select the API.


  6. Hi Christian,

    excuse me for the late response, but I had a lot of work during this week.

    I suggest keeping the same discpline for an independent project (same versions for “Target SDK” and “Compile With” – search for “Figure 1” in this link, if you misunderstood something: )

    This should solve your problem and if not, prefer KitKat instead of L, since L is not still so “stable”.


  7. Hello Anonymoys!

    First of all, as a disclaimer, you should read my recent reply to Christian (July 20, 2014 at 5:11 AM). Once this is done, I guess that you only downloaded the latest versions of the required for Android Developement, tools, so what you have to do, to get over this, is to download a now-wear version of Android SDK, by clicking the “Android SDK Manager” icon in your Eclipse IDE (a selection like this, should be good, regarding Android KitKat)


  8. I am using API20:4.4W and if i click on the arrow nothing gets displayed. i get only API20 version how can i add other versions. plz help me adding edit text is more important in my project.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s