common_google_play_services_unknown_issue" is not translated in af, am, ar, be, bg

10,038

Solution 1

I had the same issue. The problem is Lint flagging string translation as a fatal error. In Eclipse you need to go into the preferences (Window -> Preferences -> Android -> Lint Error Checking) and set "Missing Translation" to warning or ignore. This is discussed here

Solution 2

It is really a problem if "unknown issue" really happens in a language for which there is no translation - this will cause the application to crash with this stacktrace:

android.content.res.Resources$NotFoundException: String resource ID #0x7f0d0039
    at android.content.res.Resources.getText(Resources.java:201)
    at android.content.res.Resources.getString(Resources.java:254)
    at com.google.android.gms.common.GooglePlayServicesUtil.b(Unknown Source)
    at com.google.android.gms.internal.c.a(Unknown Source)
    at com.google.android.gms.internal.c.onCreateView(Unknown Source)
    at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
    ...

What I did was to open the google-play-services-lib project, open the default res/values/strings.xml and:

  1. Copy in the English translations - this gets rid of the long compilation warnings.
  2. Add a "translation" for common_google_play_services_unknown_issue:

<string name="common_google_play_services_unknown_issue">"Unknown issue."</string>

This solves the problem with warnings AND does not crash the application at runtime should unexpected circumstances happen.

Solution 3

This problem is actually caused by all languages which are support by Google Play Service but which are not supported in your own app. You can just delete all languages from google_play_services_lib which will not be supported by your app.

You need only to resolve all remaining incomplete translations.

Solution 4

Or you could add translatable="false" to every string so no errors are produced.For example:

 <string name="hello" translatable="false" >Hello World!</string>
Share:
10,038
CodeAndWave
Author by

CodeAndWave

I just love programming

Updated on July 28, 2022

Comments

  • CodeAndWave
    CodeAndWave over 1 year

    I am trying to export(signed or unsigned) my application. But i was greeted with this error. enter image description here

    here is what it says

    "common_google_play_services_unknown_issue" is not translated in af, am, ar, be, bg, ca, cs, da, de, el, en-rGB, es, es-rUS, et, fa, fi, fr, hi, hr, hu, in, it, iw, ja, ko, lt, lv, nb, nl, pl, pt, pt-rPT, ro, ru, sk, sl, sr, sv, sw, th, tl, tr, uk, vi, zh-rCN, zh-rTW, zu
    
    Issue: Checks for incomplete translations where not all strings are translated Id: MissingTranslation
    
    If an application has more than one locale, then all the strings declared in one language should also be translated in all other languages.
    
    If the string should not be translated, you can add the attribute translatable="false" on the <string> element, or you can define all your non-translatable strings in a resource file called donottranslate.xml. Or, you can ignore the issue with a tools:ignore="MissingTranslation" attribute.
    
    By default this detector allows regions of a language to just provide a subset of the strings and fall back to the standard language strings. You can require all regions to provide a full translation by setting the environment variable ANDROID_LINT_COMPLETE_REGIONS.
    

    This is the first time i encounter this error. And i cant find any solution in the net. Any idea how to fix this?

  • Cordovaing
    Cordovaing about 8 years
    Just complementing... You need to do it everytime you update Eclipse. I did it a couple months ago, update Eclise and the problem appears again. This answer helped a lot (again)!