Eclipse当我在模拟器和手机上遇到强制关闭错误时,我正在使用IDE 编写一个Android应用程序.我只是改变了布局,strings.xml并且我没有在eclipse中显示错误,当我尝试在eclipse模拟器或智能手机上打开应用程序时,它仍然说"强制关闭".这是我的布局,main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ButtonConnect" />
<Button
android:id="@+id/device"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/connect"
android:text="@string/ButtonDevice" />
<ImageView
android:id="@+id/joystick_hulle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/joystickhulle"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="30dp"
android:layout_marginLeft="30dp"
android:src="@drawable/joystick_bg" />
<ImageView
android:id="@+id/joystick"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/joystick"
android:layout_alignLeft="@+id/joystick_hulle"
android:layout_alignTop="@+id/joystick_hulle"
android:layout_marginLeft="17dp"
android:layout_marginTop="17dp"
android:src="@drawable/joystick" />
<Button
android:id="@+id/M1P"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/device"
android:layout_marginLeft="25dp"
android:layout_toRightOf="@+id/device"
android:text="@string/Pfeilhoch" />
<Button
android:id="@+id/M2P"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/M1P"
android:layout_alignBottom="@+id/M1P"
android:layout_marginLeft="25dp"
android:layout_toRightOf="@+id/M1P"
android:text="@string/Pfeilhoch" />
<Button
android:id="@+id/M3P"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/M2P"
android:layout_alignBottom="@+id/M2P"
android:layout_marginLeft="25dp"
android:layout_toRightOf="@+id/M2P"
android:text="@string/Pfeilhoch" />
<Button
android:id="@+id/M4P" …Run Code Online (Sandbox Code Playgroud)