问题
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 (Even I 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:
- I'm idiot or
- Google publish crap that doesn't allow to use another Google crap etc.
回答1:
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.
回答2:
On the top of your strings file, change the <resources>
to this:
<resources tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools">
回答3:
Looks like some caching issue of Android Studio. For me File -> Invalidate caches/restarts fixed the issue.
回答4:
Goto
Window->preferences->Android->Lint Error Checking -->Correctness: Messages--> Extra Translations ------------>make it Fatal to Warning
回答5:
In Android Studio, Go to File> Invalidate Caches / Restart..., and click on Invalidate and Restart.
回答6:
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.
回答7:
i had the same problem.. and doing a "clean project" fixed the issue
回答8:
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.
回答9:
just change extra translation from fatal to warning.It worked for me.
Window--->Preferences--->Lint Error checking--->Extra Translation(in ID column)
回答10:
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
}
回答11:
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.
回答12:
I had the same problem that I couldn't solve. I just restart Android Studio, and had no error anymore.
回答13:
A very quick solution mentioned here for this-
Simply remove the offending line and re-add it.
回答14:
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.
来源:https://stackoverflow.com/questions/23821554/auth-client-using-bad-version-title-is-translated-here-but-not-found-in-defaul