Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'next_level_button' is incompatible with attribute android:layout_below (attr) reference

This is my activity_main.xml code

 <TextView
        android:id="@+id/level"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="next_level_button"
        android:layout_centerHorizontal="true"
        android:text="Click Below to earn points"
        android:textAppearance="?android:attr/textAppearanceLarge" />

and I got an error while creating APK

Error:(12) error: 'next_level_button' is incompatible with attribute android:layout_below (attr) reference.

Please help me I want to provide this updated version to my app users :(

like image 200
Harman Thind Avatar asked Jan 05 '18 14:01

Harman Thind


1 Answers

The error is saying that next_level_button isn't a proper attribute. What it should be is @id/next_level_button to point at your button with the given id.

like image 175
RustyPiranha Avatar answered Sep 21 '22 12:09

RustyPiranha