1

My android app is complaining about resource missing, which I do think has been included and worked great in previous version of android.

e.g.,

menu.xml:27: error: Error: No resource found that matches the given name (at 'title' with value '@string/lookup_about').

<item
        android:id="@+id/about"
        android:title="@string/lookup_about" 
        android:icon="@drawable/ic_menu_help"/>

In string.xml, I've defined

<string name="lookup_about">About</string>

Update:

I found that in one case, only the 2nd @string/spinder_prompt was complained by eclipse. The first one is not

<TextView
            android:id="@+id/refresh"
            android:text="@string/spinder_prompt"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1" 
            android:textSize="16dip" 
            android:typeface="sans" 
            android:layout_gravity="left" 
            android:textColor="#ffffff"
            />

        <Spinner android:id="@+id/Spinner01"
            android:gravity="center_horizontal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:prompt="@string/spinder_prompt" 
            android:layout_weight="0.02"/>

In my strings.xml,

<string name="spinder_prompt">Choose the number of items to show</string> 

FYI. This code was built and deployed and tested on Android 2.2 systems without any issues.

4
  • 3
    Normally, it is strings.xml, not string.xml, though that should not matter. Is your string.xml file in res/values/ or a related resource set? Also, have you cleaned your project (Project | Clean from Eclipse, or ant clean from the command line)? Commented Apr 26, 2011 at 23:35
  • Have you tried cleaning the project and rebuilding? Commented Apr 26, 2011 at 23:36
  • @CommonsWare, it is strings.xml. I made sure it is under res/values/ and cleaned the project and rebuilt it. Commented Apr 27, 2011 at 0:08
  • Can you zip up the project and post if for download? Commented Apr 27, 2011 at 2:29

1 Answer 1

1

Problem solved. The reason is due to the upgrade from 2.1-> 3.0. The automatically generated R.java cannot update itself, one has to "edit" that file and save it. Then problem solved. Developers are experiencing similar issues...http://www.coderanch.com/t/466092/Android/Mobile/android-eclipse

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.