简体   繁体   中英

AAPT: error: attribute android:margin_Bottom not found

I am creating a simple login apps and have used Firebase Realtime Database to store the username, password and phone. For XML design part I have used LinearLayout and it also has margin_Bottom, but for some reason when I run the code it says 'AAPT: error: attribute android:margin_Bottom not found'. Here is the code.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.communicationappbounceback.MainActivity"
    android:orientation="vertical"
    android:gravity="center"
    android:margin_Bottom="5dp"
    android:layout_gravity="center">


    <EditText
         android:layout_width="200dp"
         android:layout_height="50dp"
         android:hint="Name"
         android:inputType="textPersonName"
         android:margin_Bottom="5dp"
         android:id="@+id/et_name"/>

    <EditText
        android:layout_width="200dp"
        android:layout_height="50dp"
        android:hint="Phone"
        android:inputType="phone"
        android:margin_Bottom="5dp"
        android:id="@+id/et_phone"/>

    <EditText
        android:layout_width="200dp"
        android:layout_height="50dp"
        android:hint="Email"
        android:inputType="textEmailAddress"
        android:margin_Bottom="5dp"
        android:id="@+id/et_email"/>

    <Button
        android:marginTop="10dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Send"
        android:id="@+id/btn_send"/>


</LinearLayout>

Instead of "android:margin_Bottom" you will want "android:layout_marginBottom".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM