4

I have this in Android Manifest:

<application
    android:label="@string/app_name"
    ...
</application>

and in strings.xml:

 <string name="app_name">My App Name</string>

Everything ok. Now, my problem is that I'm using an aar dependency whose strings.xml file contains an item named app_name, too.

 <string name="app_name">My Library Name</string>

And my project is using the second one instead.

How can I solve this conflict?

Héctor
  • 24,444
  • 35
  • 132
  • 243

2 Answers2

4

A unique resource name for the element, which you can use to obtain a reference to the View from your application.

For better way , Just use Different String Name .

IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
1
**Its very easy change key value app_name as per your way**

example

change strings.xml
<string name="app_name">My App Name</string> line like
<string name="my_app_name">My App Name</string>

Then in manifest file use
<application
    android:label="@string/my_app_name"
    ...
</application>
Abhishek
  • 3,348
  • 3
  • 15
  • 34