在Eclipse的Andr​​oid应用程序:编辑文字没有显示在图形布局 [英] Android app in Eclipse: Edit text not showing on Graphical layout

查看:164
本文介绍了在Eclipse的Andr​​oid应用程序:编辑文字没有显示在图形布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一个文本字段添加到我在Eclipse的Andr​​oid应用程序,但后来我拖累纯文本选项,以图形化的布局,一个消息在底部过来。它读 java.lang.System.arraycopy([CI [CII)V:在渲染过程中异常升高 异常详细信息记录在窗口>显示视图>错误日志 甚至当我去窗口>显示视图没有错误日志选项。整个设计是没用的了,因为我不能用它了,直到我从XML删除的EditText 直接。是什么原因造成这个错误,我该如何解决?我正在运行的最新版本(截止到今天,14年6月30日),和Windows 8专业版64位。

下面是我的完整布局code:

 < RelativeLayout的的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
的xmlns:工具=htt​​p://schemas.android.com/tool​​s
机器人:layout_width =match_parent
机器人:layout_height =match_parent
工具:上下文=$ {relativePackage} $ {activityClass}。>

<的TextView
    机器人:ID =@ + ID / textView1
    机器人:layout_width =WRAP_CONTENT
    机器人:layout_height =WRAP_CONTENT
    机器人:layout_alignParentTop =真
    机器人:layout_centerHorizo​​ntal =真
    机器人:layout_marginTop =18dp
    机器人:文本=@字符串/ welcome_text/>

<的EditText
    机器人:ID =@ + ID / editText1
    机器人:layout_width =WRAP_CONTENT
    机器人:layout_height =WRAP_CONTENT
    机器人:layout_centerHorizo​​ntal =真
    机器人:layout_centerVertical =真
    机器人:EMS =10
    机器人:inputType =文本>

    <不是requestFocus />
< /的EditText>

< / RelativeLayout的>
 

解决方案

选中Android版本呈现布局时使用,并确保你没有使用,对于Android Wear结束的W的一个版本(的API 20:Android的4.4W)。我不相信磨损支持的EditText

在两者的Andr​​oid Studio和Eclipse,它与Android的绿色布局preVIEW工具栏中的下拉列表。您可能需要明确,而不是将其设置让IDE自动选择Android版本。

I am trying to add a text field onto my Android app in Eclipse, but then I drag the Plain text option on to the graphical layout, a message at the bottom comes up. It reads Exception raised during rendering: java.lang.System.arraycopy([CI[CII)V Exception details are logged in Window > Show View > Error Log Even when I go to Window > Show View there is no error log option. The whole designer is useless now, because I can not use it anymore until I delete the EditText directly from the xml. What is causing this error, and how do I fix it? I am running the latest version (as of today, 6-30-14), and Windows 8 Pro x64.

Here is my full layout code:

<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>

解决方案

Check the "Android version to use when rendering layouts" and make sure you're not using a version that ends in "W" for Android Wear (e.g. API 20: Android 4.4W). I don't believe Wear supports EditText.

In both Android Studio and Eclipse, it's the dropdown with the green android in the layout preview's toolbar. You may want to set it explicitly and not allow the IDE to choose the Android version automatically.

这篇关于在Eclipse的Andr​​oid应用程序:编辑文字没有显示在图形布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆