I'm kind of new to developing and in the code I am working on now R.java won't generate. I haven't imported android.R anywhere, build automatically is turned on, and I have tried cleaning the project several times. I read that any errors in any of your XML files will keep R from generating and I only have one and it says "The prefix "xliff" for element "xliff:g" is not bound" Here is the section of cade where that is. The error is on line 22 where it first says "xliff" but is not there on line 28 where it has the same thing:
<?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>
Think you need to declare the namespace in the opening tag...
AFAICT, you need to change
<resources xmlns:android="http://schemas.android.com/apk/res/android">
to
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With