簡體   English   中英

在包“ android”中找不到屬性“ Layout_below”的資源標識符

[英]No resource identifier found for attribute 'Layout_below' in package 'android'

我對此非常陌生-剛開始進行初學者android開發-所以對這個愚蠢的問題感到抱歉:(

我試圖將我的應用程序運行到手機上,並出現以下錯誤:

C:\Users\melod\AndroidStudioProjects\CardForMelody\app\src\main\re\layout\activity_main.xml
Error:(36) No resource identifier found for attribute 'Layout_below' in package 'android'
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException: Process 'command 'C:\Users\melod\AppData\Local\Android\Sdk\build-tools\24.0.1\aapt.exe'' finished with non-zero exit value 1
Information:BUILD FAILED

有人可以幫忙嗎? 我的代碼如下所示:

  <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.android.cardformelody.MainActivity">


<ImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/rosetrim"
    android:scaleType="centerCrop"/>

<TextView
    android:id="@+id/Melody"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="34sp"
    android:fontFamily="Thin"
    android:layout_marginLeft="110dp"
    android:layout_marginBottom="10dp"
    android:layout_marginTop="200dp"
    android:text="Melody..." />

<TextView
    android:id="@+id/thebest"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="20sp"
    android:fontFamily="cursive"
    android:layout_below="@id/Melody"
    android:layout_marginLeft="170dp"
    android:text="You're the best"
    />
<TextView
    android:id="@+id/lovemelody"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="10sp"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:layout_marginBottom="120dp"
    android:layout_marginRight="100dp"
    android:Layout_below="id@/thebest"
    android:text="LOVE MELODY" />

在您的最后一個TextView中

<TextView
    android:id="@+id/lovemelody"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="10sp"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:layout_marginBottom="120dp"
    android:layout_marginRight="100dp"
    android:Layout_below="id@/thebest"
    android:text="LOVE MELODY" />

更改此行

 android:Layout_below="id@/thebest"

對此

 android:layout_below="id@/thebest"

您正在編寫Layout_below但它是layout_below因此請更改它。

暫無
暫無

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

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