E
E
Evgeny Vasilenko2015-02-12 20:16:31
Android
Evgeny Vasilenko, 2015-02-12 20:16:31

How to properly store string resources?

Good afternoon.
I have a Content Provider in an application. It is declared in the Manifest and has an authority tag. When building an application, it is recommended to move the authority string to resources and not store it directly in the Manifest. Did so. Got a new error.
ProGuard complains that there is no translation for this string in other languages. The application is localized only in English, Russian and Ukrainian.
If I insert this line into each xml for translation, then there is already a new error that there should be only one authority and cannot have several options.
How to get out of this situation correctly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Max, 2015-02-13
@Lucky_spirit

The solution is very simple:

<resources>
<string name="app_name" translatable="false">APP NAME</string>
</resources>

A
anyd3v, 2015-02-13
@anyd3v

1. Throw away the recommendation
2. Do it like in google play service: make a separate file (not strings.xml, but for example authorities.xml)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question