开发者

android: no resource found at @string

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"
        andro开发者_开发百科id: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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜