android - 渲染期间引发异常 : java. lang.System.arraycopy

标签 android eclipse

我对新的 ADT 版本有一个奇怪的问题。我已经从 eclipse.org 下载了新的 Eclipse然后我在上面安装 ADT。一切正常;我可以为 android 创建一个项目,一切正常,除了:

在尝试创建一个 xml 布局时,我收到以下错误:

Exception raised during rendering: java.lang.System.arraycopy

在错误日志中我看到:

Failed to render set of icons for AnalogClock, AutonCompleteTextView, button, SmallButton , ....

Ff 我将 EditText 更改为 TextView,错误消失。即使出现此警告,我也可以运行我的程序,但我想在图形部分查看我的布局。

我的布局是:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/settingback"
    android:orientation="vertical"
    android:weightSum="480" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="50"
        android:gravity="right"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/close"
            android:layout_width="50dp"
            android:layout_height="match_parent"
            android:background="#00000000" />
    </LinearLayout>

    <View
        android:id="@+id/view1"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="20" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="40"
        android:orientation="horizontal"
        android:weightSum="320" >

        <View
            android:id="@+id/view8"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40" />

        <EditText
            android:id="@+id/textView1"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="240"
            android:gravity="center|right"
            android:background="#00000000"/>

        <View
            android:id="@+id/view9"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40" />
    </LinearLayout>

    <View
        android:id="@+id/view2"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="20" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="35"
        android:orientation="horizontal" >

        <View
            android:id="@+id/view10"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40" />

        <EditText
            android:id="@+id/textView2"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="240"
            android:gravity="center|right"
            android:background="#00000000" />

        <View
            android:id="@+id/view11"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40" />
    </LinearLayout>

    <View
        android:id="@+id/view3"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="10" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="35"
        android:orientation="horizontal" >

        <View
            android:id="@+id/view12"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40" />

        <EditText
            android:id="@+id/textView3"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="240"
            android:gravity="center|right"
            android:background="#00000000"/>

        <View
            android:id="@+id/view13"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40" />
    </LinearLayout>

    <View
        android:id="@+id/view4"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="105" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="40"
        android:orientation="horizontal" >

        <View
            android:id="@+id/view14"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40" />

        <EditText
            android:id="@+id/textView4"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="240"
            android:gravity="center|right"
            android:background="#00000000" />

        <View
            android:id="@+id/view15"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40" />
    </LinearLayout>

    <View
        android:id="@+id/view5"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="5" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="40" >

        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40"
             />

        <EditText
            android:id="@+id/textView6"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="240"
            android:gravity="center|right"
            android:background="#00000000" />

        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="40" />
    </LinearLayout>

    <View
        android:id="@+id/view6"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="20" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="30"
        android:orientation="horizontal"
        android:weightSum="320" >

        <View
            android:id="@+id/view16"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="90" />

        <CheckBox
            android:id="@+id/shake"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:layout_weight="70"
            android:gravity="center" />

        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="10" />

        <CheckBox
            android:id="@+id/ring"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:layout_weight="70"
            android:gravity="center" />

        <View
            android:id="@+id/view17"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="80" />
    </LinearLayout>

    <View
        android:id="@+id/view7"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="30" />

</LinearLayout>

我在这里搜索了答案,但没有找到任何答案。我怎样才能解决这个问题?

PS:这个问题发生在 ADT 23 上 - 我用 ADT 22.6 试了一下,效果很好。

最佳答案

这个问题发生在 API 20 (Android 4.4 W) 我最近遇到了一个问题,但问题将通过将用于渲染级别的 Android 版本从 API 20 (Android 4.4 W) 更改为 API 19 (Android 4.4. 2)(图形布局右上角的android图标)或将您的SDK更新为Android L(API 20 L预览)

屏幕截图:

enter image description here

关于android - 渲染期间引发异常 : java. lang.System.arraycopy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24451490/

相关文章:

java - Canvas 如何确定其裁剪范围?

android - Gradle添加依赖项抛出方法dependencies.add

java - 如何在 Eclipse 中导入 ShowcaseView?

java - Eclipse:编辑项目构建路径中属于 jars 的任何 .class 文件,并自动生成与这些编辑对应的新类文件

java - GWT_HOME 不存在 (mac 10.8.3)

android - 为什么 Project/Properties/Android 在 Eclipse 中不起作用?

android - 如何突出显示日历日期哪些日期来自数据库

java - 如何在Android按钮中调用静态类

java - Eclipse 不断从源文件夹中删除 src/it

java - eclipse中如何自动部署maven项目到tomcat