views:

42

answers:

0

I made an XML file under my newly created res/menu folder. Menu.xml contains my menu definition for use with MenuInflater.

The entire XML file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"&gt;
   <item android:id="@+id/settings"
      android:title="@string/settings_label"
      android:alphabeticShortcut="@string/settings_shortcut" />
</menu>

I'm trying to run the program and the console keeps returning two problems.

  1. Bad XML block: no root element node found
  2. error: Error parsing XML: unbound prefix

I can't seem to see what's wrong with my XML file. Any thoughts? Am I missing something basic here?

I know the android dev docs say that MenuInflater "only works with an XmlPullParser returned from a compiled resource (R. something file.)" Doesn't that just mean that I need to create an XML file under my res/ folder as I've done? Did I screw something up here? (I just created a new android xml file. put it under Res/menu and referenced it as "R.menu" when I called the inflate method.