-1
<?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="com.kun.www.love.MainActivity">
    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:src="@drawable/party"
        android:scaleType="centerCrop"/>
    <TextView
        android:text="Happy Birthday, Kun"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@android:color/white"
        android:textSize="36sp"
        android:fontFamily="san-serif-light"
        android:layout_marginTop="20dp"
        android:layout_marginLeft="20dp"/>
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/Love"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:textColor="@android:color/white"
        android:textSize="36sp"
        android:fontFamily="san-serif-light"
        android:layout_marginBottom="20dp"
        android:layout_marginRight="20dp"/>
</RelativeLayout>


<resources>
    <string
        name="Love"
        >From Kun</string>
</resources>

This is the error. I tried to solve it, but I failed.

enter image description here enter image description here

Dharman
  • 30,962
  • 25
  • 85
  • 135
Kun
  • 11
  • 1

3 Answers3

0

Check in the file res/values/strings.xml have app_name or not? if its not add

 <string name="app_name">"Your App name"</string>
sasikumar
  • 12,540
  • 3
  • 28
  • 48
0

Add in your manifest file in application tag this below line

    android:label="@string/app_name"

and also add in string.xml file below line

<string name="app_name">App Name</string>
Zaki Pathan
  • 1,762
  • 1
  • 13
  • 26
0

XML file saved at res/values/strings.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string
        name="Love"
        >From Kun</string>
</resources>

and also have this

<string name="app_name">"My App"</string>
John Joe
  • 12,412
  • 16
  • 70
  • 135