Reputation: 61
I have a standard app. I need to change some text, settings and graphics per client. This way every client gets the app, customized for their brand.
I want to do this, by making the standard app a library. I can now overwrite text in the string.xml
but when I want to change (for example) the splashscreen.png i get this error:
Error: No resource found that matches the given name (at 'drawable' with value '@drawable/splashscreen.png')
What am I doing wrong? Or is there a better way to tackle this problem?
thanks in advance.
Upvotes: 2
Views: 2059
Reputation: 101
Did you link the standard app as a library in the white-labeled app? When that is done, just place the new image/drawable in the res/drawable folder of the white-label app. Make sure the image/drawable has the same names as the image/drawable in the standard app.
You might want to read this https://developer.android.com/studio/projects
Upvotes: 0
Reputation: 21585
I can't add comment to Steven Straatemans' accepted answer but in this article http://developer.android.com/guide/topics/resources/localization.html it is said that all your default resources should be present. Thus, you should add splashscreen.png to default files too. In the article they speak about locale but the same pays true for all the resources.
Whenever the application runs in a locale for which you have not provided locale-specific text, Android will load the default strings from res/values/strings.xml. If this default file is absent, or if it is missing a string that your application needs, then your application will not run and will show an error.
Upvotes: 0
Reputation: 61
Ok I found the problem. I had my default drawables in the directory "drawable". When I changed the directory name to "drawable-ldpi" everything worked fine.
Upvotes: 2