No resource was found that matches the specified name (in 'layout_alignTop' with value '@ id / imageView3')

It:

<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 an error:

Error: (77, 35) A resource was not found that matches the specified name (in 'layout_alignTop' with the value '@ id / imageView3').

Error: (78, 35) A resource was not found that matches the specified name (in 'layout_toLeftOf' with the value '@ id / imageView3').

+4
source share
2 answers

You can use. Add a character first +.

 android:layout_alignTop="@+id/imageView3"

After that, Clean-Restore-Restart Yours IDE.

+11

, , , .

<ImageView
    android:id="@+id/image_view"
    android:width="wrap_content"
    android:height="wrap_content">
<ScrollView
    android:id="@+id/scroll_view"
    android:width="wrap_content"
    android:height="wrap_content"
    android:layout_below="@id/image_view">
    <LinearLayout
        ... >
        ... 
    </LinearLayout>
</ScrollView>

-

<ScrollView
    android:id="@+id/scroll_view"
    android:width="wrap_content"
    android:height="wrap_content"
    android:layout_below="@id/image_view">
    <LinearLayout
        ... >
        <ImageView
            android:id="@+id/image_view"
            android:width="wrap_content"
            android:height="wrap_content">
        <ImageView
            android:id="@+id/image_view2"
            android:width="wrap_content"
            android:height="wrap_content"
            android:layout_below="@id/image_view">
        ...
    </LinearLayout>
</ScrollView>

, IDE

android:layout_below="@id/image_view"

ImageView, , ,

android:layout_below="@id/image_view"

ScrollView, .

0

Source: https://habr.com/ru/post/1622682/


All Articles