28

I'm forced to use Google Play service (I need Location Service). So, after I wrote all code and tested application on device, i tried to export signed application. And all I got is Lint errors like (I even changed MissingTranslation erros in Lint from fatal to warning)

"auth_client_using_bad_version_title" 
is translated here but not found in default locale

And this error repeats in all "values-" folders I know that I can disable lint checking before exporting application. But is there any way to do it right without any hacks, errors and curses on Google developers? So I think this case in one of two things:

  1. I'm idiot or
  2. Google publish crap that doesn't allow to use another Google crap etc.
solveMe
  • 1,866
  • 1
  • 18
  • 20

14 Answers14

27

On the top of your strings file, change the <resources> to this:

<resources tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools">
Panthro
  • 3,247
  • 2
  • 32
  • 37
22

Looks like some caching issue of Android Studio. For me File -> Invalidate caches/restarts fixed the issue.

Dharmendra
  • 33,296
  • 22
  • 86
  • 129
13

Goto

Window->preferences->Android->Lint Error Checking -->Correctness: Messages--> Extra Translations ------------>make it Fatal to Warning

Prasanth T
  • 165
  • 9
11

I got the temporary solution.

copy auth_strings.xml from values-en-rIN (locale values for INDIA you can use any locale) and paste it in default values folder.

Prasanna
  • 526
  • 7
  • 18
9

In Android Studio, Go to File> Invalidate Caches / Restart..., and click on Invalidate and Restart.

Mester Hassan
  • 538
  • 5
  • 10
5

So the 'default locale' is the one with just 'values' with no modifiers like -af, -am, -en etc. The problem happens because there is no auth_strings.xml file in that folder so there is no fallback option and hence the error.

To fix it just copy the auth_strings.xml file from another of the values folders to be your default language. I'd suggest a common language like English or Spanish. I used English. This fixes the error for me. I guess they just forgot to put in a default language.

Uwais A
  • 737
  • 6
  • 23
5

i had the same problem.. and doing a "clean project" fixed the issue

mapo
  • 194
  • 4
  • 11
1

All I did was to copy the 'auth_strings.xml' file from the English folder to the values folder as the default version was missing.

Carlos F
  • 190
  • 3
  • 10
1

just change extra translation from fatal to warning.It worked for me.

Window--->Preferences--->Lint Error checking--->Extra Translation(in ID column)

Subodh
  • 11
  • 1
0

In case, if you want to just pass the release process;

In Android Studio, through Gradle, you can disable "Lint Error Checking" during the release process.

Open your build.gradle(app) file and add the following code snippet inside the android tag.

    lintOptions {
    checkReleaseBuilds false
    // Or, if you prefer, you can continue to check for errors in release builds,
    // but continue the build even when errors are found:
    abortOnError false
}
Aksel Fatih
  • 1,419
  • 18
  • 31
0

Make sure you have the string in the default locale. If you have it, try to delete the error line in the strings.xml and undo the deletion. If the string.xml is from a lib, delete the lib, sync, undo the deletion and sync again.

If the above step did not work, clean the project.

One Code Man
  • 224
  • 2
  • 5
0

I had the same problem that I couldn't solve. I just restart Android Studio, and had no error anymore.

Killyox
  • 99
  • 5
0

A very quick solution mentioned here for this-

Simply remove the offending line and re-add it.

Community
  • 1
  • 1
GouravJn
  • 246
  • 1
  • 6
  • 18
0

Ensure you have the string in the default area. In the event that you have it, attempt to erase the mistake line in the strings.xml and fix the cancellation. On the off chance that the string.xml and fix the cancellation. On the off chance that the string.xml is from a lib, erase the lib, match up, fix the erase and adjust once more.

On the off chance that the above advance didn’t work, clean the venture.