关于'android'属性的警告

时间:2017-07-19 07:02:38

标签: android xml android-studio

每次我将“android”属性放到位置时,我都会收到此警告。请帮忙。

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

2 个答案:

答案 0 :(得分:1)

您需要添加 xmlns:android =" 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>

答案 1 :(得分: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>