Ответ 1
@+id
не @id+
. Кажется, урок неправильный!
Это действительно начинает сводить меня с ума.
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id+/textview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello"/>
Выдает следующее сообщение об ошибке: "Error: no resource found that matches the given name (at 'id' with value '@id+/textview')
.
Это копия и вставка из мира приветствия Android пример.
@+id
не @id+
. Кажется, урок неправильный!
Это просто маленькая опечатка; вам нужно поставить "+" после "@", а не после "id":
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello"/>