2017-07-19 76 views
-6

每當我獲得「android」屬性時,我都會收到此警告。請幫忙。'android'屬性的警告

I get this warning everytime I get the "android" attribute into place. I am a beginner in android studio. Kindly help.

+1

完成標籤第一 –

+3

[請不要發佈您的代碼爲圖像。(// meta.stackoverflow.com/q/285551) –

回答

1

您需要添加的xmlns:安卓= 「http://schemas.android.com/apk/res/android」 根佈局

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent"> 
........ 
</RelativeLayout> 
+0

你需要在您的**相對佈局**標籤中添加名稱空間。你不需要記住xmlns:android就像代碼一樣。只需**按Alt + Enter **並按照指定的說明解決您的問題。 –

0

嘗試了這一點:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     android:orientation="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"> 

    //put your radio group here 

</LinearLayout>