Ich habe eine einfache Android-App und stürzt weiter ab, wenn ich es starte. Der Emulator sagt "Appname hört auf". Ich habe den Standardcode in der Aktivitätsklasse nicht bearbeitet. Mein Layout xml ist unten:Meine einfache Android-App stürzt ab
<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="wrap_content"
>
<TextView
android:id="@+id/lblName"
android:text="Name"
android:layout_alignParentTop="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:id="@+id/txtName"
android:layout_alignParentLeft="true"
android:layout_below="@id/lblName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
/>
<LinearLayout
android:layout_alignParentLeft="true"
android:layout_below="@id/txtName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:id="@+id/btnSubmit"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Submit"
></Button>
<Button
android:id="@+id/btnCancel"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Cancel"
></Button>
</LinearLayout>
</RelativeLayout>
post yout logcat oder Fehler, den Sie bekommen –
post stacktrace atleast – Piyush
Zeigen Sie uns die Log-Fehler und Aktivitätscode –