Решением было просто изменить порядок текстовых представлений.

даю простое приложение со списком задач. Я пытаюсь организовать свой макет, размещая их относительно друг друга. Я делаю это, вызывая атрибуты XML, такие какandroid:layout_toStartOf="@id/to_do_btn" но тем не менее я получаюNo Resource Found That Matches The Given Name ошибка. Я в основном попробовал каждое решение на Stackoverflow, но ничего не помогло. Это мой XML:

<?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="myapp.onur.todo.MainActivity">

    <ListView
        android:id="@+id/to_do_list"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_alignParentStart="true"
        android:layout_above="@id/to_do_btn"
        android:layout_margin="5dp"
        >
    </ListView>

    <EditText
        android:id="@+id/to_do_editText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:hint="Enter Something To Do"
        android:layout_toStartOf="@id/to_do_btn"
        android:layout_alignParentBottom="true"
        android:layout_alignParentStart="true"
        android:layout_alignTop="@id/to_do_btn"
        android:layout_below="@id/to_do_list"
        android:layout_margin="5dp"
        />

    <Button
        android:id="@+id/to_do_btn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="add item"
        android:layout_margin="5dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentEnd="true"
        />

</RelativeLayout>

И это пример ошибки:Error:(15, 31) No resource found that matches the given name (at 'layout_above' with value '@id/to_do_btn').

Я понятия не имею, что происходит. Если это поможет, вот мои зависимости gradle:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
}

Ответы на вопрос(1)

Ваш ответ на вопрос