我对新的ADT版本有一个奇怪的问题.我从eclipse.org下载了新的Eclipse,然后在其上安装了ADT.一切正常; 我可以为android创建一个项目,所有东西都运行良好,除了:
尝试创建一个xml布局时,我收到以下错误:
Exception raised during rendering: java.lang.System.arraycopy
Run Code Online (Sandbox Code Playgroud)
在错误日志中,我看到:
Failed to render set of icons for AnalogClock, AutonCompleteTextView, button, SmallButton , ....
Run Code Online (Sandbox Code Playgroud)
如果我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" …Run Code Online (Sandbox Code Playgroud) 我已经在Eclipse/Android中编写了一些小应用程序,所以我对整个edi并不是全新的.
我在家里创建了几个屏幕(一个登录屏幕和一个或两个以上),应用程序工作正常,现在我想在工作中构建相同的屏幕,我不能将任何文本控件拖到应用程序页面上,它给了我teh低于错误,屏幕保持空白?下面是我的XMl并给出错误:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".LoginScreen" >
<EditText
android:id="@+id/textboxUserName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="121dp"
android:ems="10"
android:hint="@string/blankstring"
android:text="@string/blankstring" />
<TextView
android:id="@+id/labelusername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/textboxUserName"
android:layout_alignLeft="@+id/textboxUserName"
android:layout_marginBottom="39dp"
android:hint="@string/LblUsername"
android:text="@string/LblUsername"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/btnLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/passwordboxPassword"
android:layout_alignRight="@+id/passwordboxPassword"
android:layout_below="@+id/passwordboxPassword"
android:layout_marginTop="19dp"
android:focusable="false"
android:hint="@string/btnLogin"
android:text="@string/btnLogin" />
<TextView
android:id="@+id/labelpassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textboxUserName"
android:layout_below="@+id/textboxUserName"
android:layout_marginTop="21dp"
android:hint="@string/LblPassword"
android:text="@string/LblPassword"
android:textAppearance="?android:attr/textAppearanceLarge" />
<requestFocus />
<EditText
android:id="@+id/passwordboxPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/labelpassword"
android:layout_below="@+id/labelpassword"
android:ems="10"
android:hint="@string/blankstring"
android:inputType="textPassword"
android:text="@string/blankstring" >
</EditText>
<TextView
android:id="@+id/lblnewuser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/btngooglelogin"
android:layout_centerHorizontal="true"
android:layout_marginTop="51dp"
android:text="@string/lblNewUser"
android:textAppearance="?android:attr/textAppearanceLarge" …Run Code Online (Sandbox Code Playgroud)