-7
我不斷收到錯誤,如error:atrribute paddingleft
沒有發現和失敗的鏈接文件資源的錯誤和其他幾個沒有人知道我在main.java類解決我的問題我有它設置爲setContentView(R.layout.activity_main);
解決Android Studio中的編譯錯誤?
<?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"
android:orientation="vertical"
tools:context="com.example.issacrodriguez.robber.main">
<TextView
android:id="@+id/scoreLabel"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:paddingLeft="50dp"
android:paddingleft="10dp"
android:text="Score : 300"
android:textSize="18sp" />
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/StartLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tap To Start!"
android:textSize="30sp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="130dp" />
<ImageView
android:id="@+id/robber"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/robberr"
android:layout_gravity="center_vertical"/>
<ImageView
android:id="@+id/moneybag"
android:layout_width="50dp"
android:layout_height="40dp"
android:src="@drawable/moneybag" />
<ImageView
android:id="@+id/cop"
android:layout_width="60dp"
android:layout_height="24dp"
android:src="@drawable/cop"/>
</FrameLayout>
</LinearLayout>
Android Studio ** – istackz
錯誤在@@ id/scoreLabel ID中,1.錯誤的屬性名稱(paddingleft)和2.錯誤地寫入了兩次(paddingLeft)。 – Bharatesh