簡體   English   中英

android RelativeLayout錯誤“找不到資源標識符......”

[英]android RelativeLayout error “ No resource identifier found…”

我正在嘗試在Android中編寫我的第一個相對布局。

我有一個線性布局工作正常,所以我的相對布局xml文件是基於它。

我收到以下錯誤:

    error: No resource identifier found for attribute 'layout_bottom' in package 'android'

xml(部分)代碼是:

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

    <TextView
    android:id="@+id/text_1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="--"
    android:layout_alignParentTop="true"
    /> 

    <RadioGroup                                <-- the error is given in this line
          android:id="@+id/kk"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:layout_bottom="@id/text_1"
          >

謝謝

進行如下更改:

   <RadioGroup
          android:id="@+id/kk"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:layout_below="@id/text_1"
       />

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM