我得到一个XML:android中的未绑定前缀错误我尝试了很多,但它仍然发生请尽快解决................... .................................................. .................................................. .................................................. .................................................. .................................................. .............................
<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="match_parent">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Click" />
<pl.pawelkleczkowski.customgauge.CustomGauge
android:id="@+id/gauge3"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
app:endValue="100"
app:pointEndColor="@color/Green"
app:pointStartColor="@color/Red"
app:startAngel="180"
app:startValue="0"
app:strokeCap="BUTT"
app:strokeColor="@color/Gray"
app:strokeWidth="20dp"
app:sweepAngel="180" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/gauge3"
android:layout_centerHorizontal="true"
android:layout_marginBottom="52dp"
android:text="0"
android:textSize="30dp"
android:textStyle="bold" />
</RelativeLayout>
答案 0 :(得分:2)
更改
<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="match_parent">
到
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:gauge="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" >
答案 1 :(得分:0)
更改
<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="match_parent">
到
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">