android - 没有默认翻译并且不会生成 R

标签 android git android-launcher

大家好!

我正在尝试编译 Trebuchet Launcher,这是一个开源的。问题是我一直在没有默认翻译的字符串上遇到编译错误,最重要的是没有生成 R 。 因此,在 xml 文件失败后,我会从未找到的资源中收到错误。 使用 Eclipse。

我尝试过的:

进入项目属性并忽略MissingTranslation,它仍然不起作用。

检查 xml 文件是否缺少任何行或者是否以某种方式损坏,但它们看起来仍然正常。

在 stackoverflow 上检查了有关此类相关问题的各种建议,但仍然没有运气。

启动器上的 Git 链接

https://github.com/CyanogenMod/android_packages_apps_Trebuchet

给大家一个想法

[2016-01-19 20:14:46 - ToggleWeightWatcher] warning: string 'accessibility_search_button' has no default translation.
[2016-01-19 20:14:46 - ToggleWeightWatcher] warning: string 'accessibility_voice_search_button' has no default translation.
[2016-01-19 20:14:46 - ToggleWeightWatcher] warning: string 'all_apps_cling_add_item' has no default translation.
[2016-01-19 20:14:46 - ToggleWeightWatcher] warning: string 'all_apps_cling_title' has no default translation.

[2016-01-19 20:14:46 - ToggleWeightWatcher] C:\Users\Arlind\trebouche\AndroidManifest.xml:92: error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme').
[2016-01-19 20:14:46 - ToggleWeightWatcher] 
[2016-01-19 20:14:46 - ToggleWeightWatcher] C:\Users\Arlind\trebouche\AndroidManifest.xml:110: error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme').

最佳答案

在 AndroidManifest.xml 第 113 行中提到:

android:theme="@style/Theme"

如果您使用搜索,则此样式未在 res/文件夹中的任何位置定义(仅在 WallPicker res/文件夹内)。另请注意 Android.mk 文件,它似乎是用于构建项目的 makefile。该文件定义为资源目录:

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/WallpaperPicker/res $(LOCAL_PATH)/res

因此,如果您使用此 makefile 构建项目,则构建可能会成功。否则,您必须通过创建 style.xml 文件在 res/文件夹中指定“主题”样式

关于android - 没有默认翻译并且不会生成 R,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34874637/

相关文章:

android - 如何在 AOSP 构建中设置默认启动器?

android - 从它自己的 onClick() 方法更改 ImageView src

git - 如何设置 Corkscrew 通过 Draconian 代理连接到 Github

单击应用程序图标打开时,Android 应用程序会重新启动

git svn clone 打印数百个 "error: too many matches for svn-remote.svn.added-placeholder"

php - 在现有项目上安装 laravel

Android list 合并 : removing LAUNCHER intent-filter doesn't take effect

java - 无法将新行字符串附加到文件 Android 本地存储

android - Android 中自动检测大容量存储/外部驱动器

android - 在 RecyclerView 中保存和检索膨胀 View 的大小