大家好!
我正在尝试编译 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/