Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No resource found that matches the given name (at 'layout_alignTop' with value '@id/imageView3')

This:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainActivity"
android:weightSum="1">

<ImageView
    android:id="@+id/imageView2"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_alignTop="@id/imageView3"
    android:layout_toLeftOf="@id/imageView3"
    android:layout_marginRight="30dp"/>



<ImageView
    android:id="@+id/imageView3"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_gravity="center_horizontal"
    android:layout_marginTop="30dp"
    android:layout_centerHorizontal="true"/>

<ImageView
    android:id="@+id/imageView4"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_alignTop="@id/imageView3"
    android:layout_toRightOf="@id/imageView3"
    android:layout_marginLeft="30dp"/>

</RelativeLayout>

is my AndroidManifest.xml and I get the error:

Error:(77, 35) No resource found that matches the given name (at 'layout_alignTop' with value '@id/imageView3').

Error:(78, 35) No resource found that matches the given name (at 'layout_toLeftOf' with value '@id/imageView3').

like image 690
JimmyHo Avatar asked Dec 14 '22 09:12

JimmyHo


1 Answers

You can use . Add + sign at first .

 android:layout_alignTop="@+id/imageView3"

After that, Clean-Rebuild-Restart Your IDE .

like image 58
IntelliJ Amiya Avatar answered Jan 13 '23 21:01

IntelliJ Amiya