The problem is odd. I'm trying to add a String directly in build.gradle
because I need it to use Tray library (https://github.com/grandcentrix/tray). In my first project everything went fine. In the second project it's a little bit more complicated. I'm using gradle:1.2.3
and while exporting signed apk there is a MissingTranslation error.
build.gradle
applicationId "some.app.id"
resValue "string", "tray__authority", "${applicationId}.tray"
build error
.../build/generated/res/generated/release/values/generated.xml
Error:(7) Error: "tray__authority" is not translated in "pl" (Polish) [MissingTranslation]
<string name="tray__authority">some.app.id.tray</string>
generated.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Automatically generated file. DO NOT MODIFY -->
<!-- Values from default config. -->
<string name="tray__authority">some.app.id.tray</string>
</resources>
There are a few similar questions but all of them are related to strings.xml and it's suggested to
<resources
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation">
or just translatable="false"
I cannot do it because the file is auto-generated. How can I force gradle to ignore the error? I tried to change inspection settings and make it a warning but gradle is ignoring my settings.
I know it's a bug (https://code.google.com/p/android/issues/detail?id=152198) but I don't know how to resolve it. All the answers I found don't work.