Reputation: 26034
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?
Upvotes: 4
Views: 1007
Reputation: 75778
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 .
Upvotes: 4
Reputation: 3398
**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>
Upvotes: 1