It's a very simple problem in android, just two steps. It's happen when you do not create/update your string file and do not reference in your layout. Please follow the bellow steps:
Step 1:
Please go to your string.xml file (it's located in res > values > string.xml) and update this file.
Step 2:
Now go to your layout file and reference to your string file like : @string/...
Example:
Suppose your TextView like this in your layout and you show that warring massage:
now you have to go your string file and add this TextView like:
android:text="@string/TextView" />
Now it's ok. It's very good practice to write this way because this allows you to update every occurrence of the words "Hello World" in all layouts at the same time by just editing your strings.xml file. It's also useful for supporting multiple languages as a separate strings.xml file.
Thank you.
Allah Hafez.
Step 1:
Please go to your string.xml file (it's located in res > values > string.xml) and update this file.
Step 2:
Now go to your layout file and reference to your string file like : @string/...
Example:
Suppose your TextView like this in your layout and you show that warring massage:
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="60dp"
android:text="TextView" /> now you have to go your string file and add this TextView like:
<resources>
<string name="TextView">Hello World</string>
<resources>
and now update your layout file like :
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="60dp"
Now it's ok. It's very good practice to write this way because this allows you to update every occurrence of the words "Hello World" in all layouts at the same time by just editing your strings.xml file. It's also useful for supporting multiple languages as a separate strings.xml file.
Thank you.
Allah Hafez.

