1
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroll"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
***
的xmlns:工具= 「http://schemas.android.com/tools」 *此行顯示了錯誤爲標籤LinearLayout找到意外的命名空間前綴「xmlns」,我嘗試了堆棧上的解決方案,但沒有得到解決。請幫忙。意外的命名空間前綴 「的xmlns」 找到的標籤的LinearLayout(的xmlns:工具ERROR)
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity"
android:id="@+id/RL">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
android:id="@+id/label1" />
</LinearLayout>
</ScrollView>
我擺脫了工具:上下文,我是一個初學者程序員,所以原諒我,但不會導致我的程序中有任何衝突? – mohammedri
@RidwanWan - 對於您發佈的文件,我認爲不管添加名稱空間聲明還是刪除'tools:context'屬性都沒有什麼區別。這是爲了這個特定的文件。一般來說,刪除所有'tools:*'屬性意味着Android lint工具不會有太多的信息可用;因此它可能會產生虛假警告或無法產生警告來幫助追蹤問題。 –
這聽起來很公平,但它解決了問題! 謝謝! – mohammedri