【发布时间】:2014-08-21 11:15:22
【问题描述】:
我试图在 Eclipse 中向我的 Android 应用程序添加一个文本字段,但随后我将 Plain text 选项拖到图形布局上,底部出现一条消息。它读到
Exception raised during rendering: java.lang.System.arraycopy([CI[CII)V
Exception details are logged in Window > Show View > Error Log
即使我去Window > Show View 也没有错误日志选项。整个设计器现在都没用了,因为我不能再使用它,直到我直接从xml中删除EditText。是什么导致了这个错误,我该如何解决?我正在运行最新版本(截至今天,2014 年 6 月 30 日)和 Windows 8 Pro x64。
这是我的完整布局代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${relativePackage}.${activityClass}" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="18dp"
android:text="@string/welcome_text" />
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:ems="10"
android:inputType="text">
<requestFocus />
</EditText>
</RelativeLayout>
【问题讨论】:
-
发布您的完整布局。还可以尝试“Alt+Shift+Q, L”来获取错误日志。您应该学习使用 xml 选项卡。它比 GUI 更灵活、更易于使用。
-
你想要完成什么?您的布局是否符合您的要求,或者您什么也看不到?它似乎对我有用,所以如果没有更多信息,我唯一能看到的是,如果您的 strings.xml 中没有带有
welcome_type_in_a_new_or_existing_note_name的字符串。顺便说一下,这是一个不必要的长名称。 -
我在设计窗口中看不到任何内容。它只是因为错误“渲染期间引发的异常:java.lang.System.arraycopy([CI[CII)V”而变灰:另外,我已将长名称更改为“welcome_text”
-
运行应用程序时会发生什么?我们真的需要知道您遇到了什么错误才能有所帮助。正如我所说,您的 xml 对我来说很好。您是否尝试过我建议的组合键来获取错误日志?
-
为什么答案的票数这么多,而问题的票数这么少?
标签: java android eclipse text android-edittext