Eclipse冻结了从Chromecast Google发送器样本中构建的VideoBrowserActivity



我已经按照谷歌开发人员的步骤运行了适用于Android的发送器示例

https://developers.google.com/cast/docs/android_sender

我已经仔细链接了运行所需的库:

  • 投射视频-安卓
  • CastCompanionLibrary-android

按照示例中所示修复依赖项后,当我继续构建 apk 并在我的设备中运行它时,Eclipse 冻结达到 CPU 的 300%,因此永远不会构建 apk。等待一段时间后,eclipse 返回:无法执行 dex:在 Eclipse 中超出了 GC 开销限制。

我已经构建了所有库(appcompat,mediarouter,google-play-services等)和Android sdk 5.0.1(API级别21)的示例。

您对可能是什么问题有想法吗?

有一种解决方法可以在冻结之前确定哪些是链接错误。

转到项目上的右键> Android Toold>导出未签名的应用程序包>

这应该会显示 Lint 视图中的错误。就我而言,他们缺少字符串.xml数组中的翻译.xml

下面是一个示例:

"caption" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic), "bg" (Bulgarian), "bn-rBD" (Bengali: Bangladesh), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "en-rGB" (English: United Kingdom), "en-rIN" (English: India), "es" (Spanish), "es-rUS" (Spanish: United States), "et-rEE" (Estonian: Estonia), "eu-rES" (Basque: Spain), "fa" (Persian), "fi" (Finnish), "fr" (French), "fr-rCA" (French: Canada), "gl-rES" (Galician: Spain), "hi" (Hindi), "hr" (Croatian), "hu" (Hungarian), "hy-rAM" (Armenian: Armenia), "in" (Indonesian), "is-rIS" (Icelandic: Iceland), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ka-rGE" (Georgian: Georgia), "kk-rKZ" (Kazakh: Kazakhstan), "km-rKH" (Khmer: Cambodia), "kn-rIN" (Kannada: India), "ko" (Korean), "ky-rKG" (Kyrgyz: Kyrgyzstan), "lo-rLA" (Lao: Lao People's Democratic Republic), "lt" (Lithuanian), "lv" (Latvian), "mk-rMK" (Macedonian: Macedonia, the former Yugoslav Republic of), "ml-rIN" (Malayalam: India), "mn-rMN" (Mongolian: Mongolia), "mr-rIN" (Marathi: India), "ms-rMY" (Malay: Malaysia), "my-rMM" (Burmese: Myanmar), "nb" (Norwegian Bokmål), "ne-rNP" (Nepali: Nepal), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "pt-rBR" (Portuguese: Brazil), "pt-rPT" (Portuguese: Portugal), "ro" (Romanian), "ru" (Russian), "si-rLK" (Sinhala: Sri Lanka), "sk" (Slovak), "sl" (Slovene), "sr" (Serbian), "sv" (Swedish), "sw" (Swahili), "ta-rIN" (Tamil: India), "te-rIN" (Telugu: India), "th" (Thai), "tl" (Tagalog), "tr" (Turkish), "uk" (Ukrainian), "ur-rPK" (Urdu: Pakistan), "uz-rUZ" (Uzbek: Uzbekistan), "vi" (Vietnamese), "zh-rCN" (Chinese: China), "zh-rHK" (Chinese: Hong Kong), "zh-rTW" (Chinese: Taiwan, Province of China), "zu" (Zulu)
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.
You can tell lint (and other tools) which language is the default language in your res/values/ folder by specifying tools:locale="languageCode" for the root <resources> element in your resource file. (The tools prefix refers to the namespace declaration http://schemas.android.com/tools.)

[]

以下是解决此问题的方法:避免Android Lint抱怨未翻译的字符串

修复 lint 错误后,您可以让应用程序运行,调整 eclipse 中使用的内存.ini如下所示: 无法执行 dex:在 Eclipse 中超出了 GC 开销限制

最新更新