gpt4 book ai didi

java - "The prefix "xliff "for element "xliff :g "is not bound"

转载 作者:搜寻专家 更新时间:2023-10-30 21:43:14 26 4
gpt4 key购买 nike

我是开发新手,在我正在处理的代码中,现在 R.java 不会生成。我没有在任何地方导入 android.R,自动构建是打开的,我试过多次清理项目。我读到任何 XML 文件中的任何错误都会阻止 R 生成,我只有一个,它说“元素“xliff:g”的前缀“xliff”未绑定(bind)”这是 cade 的部分.错误在第 22 行,它首先说“xliff”,但在第 28 行不存在,那里有相同的内容:

    <?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<string name="app_name">Alarm Clock</string>
<string name="app_label">Alarm Clock</string>
<string name="add_alarm">Add alarm</string>
<string name="delete_alarm">Delete Alarm</string>
<string name="enable_alarm">Enable alarm</string>
<string name="disable_alarm">Disable Alarm</string>
<string name="delete_alarm_confirm">This alarm will be deleted.</string>
<string name="show_clock">Show Clock</string>
<string name="hide_clock">Hide clock</string>
<string name="label">Label</string>
<string name="default_label">Alarm</string>
<string name="set_alarm">Set alarm</string>
<string name="alarm_vibrate">Vibrate</string>
<string name="alarm_repeat">Repeat</string>
<string name="alert">Ringtone</string>
<string name="time">Time</string>
<string name="alarm_alert_dismiss_text">Dismiss</string>
<string name="alarm_alert_alert_silenced">
Alarm silenced after
<xliff:g id="minutes">%d</xliff:g>
minutes
</string>
<string name="alarm_alert_snooze_text">Snooze</string>
<string name="alarm_alert_snooze_set">
Snoozing for
<xliff:g id="minutes">%d</xliff:g>
minutes.
</string>

最佳答案

认为您需要在开始标记中声明命名空间...

AFAICT,你需要改变

<resources xmlns:android="http://schemas.android.com/apk/res/android">

<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

关于java - "The prefix "xliff "for element "xliff :g "is not bound",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9113167/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com