2017-07-19 74 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>