本文介绍了使用Eclipse Android的错误 - 没有资源的发现,匹配给定的名字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

常见的问题,我敢肯定,但我不能弄明白。在我的Andr​​oidManifest.xml和main.xml中我得到的任何资源发现,相匹配的名字。我双重检查错别字,它用来工作,但现在我弹出所有这些错误说,它不能找到我的琴弦在我的strings.xml。

Common problem I'm sure, but I can't figure it out. In my AndroidManifest.xml and main.xml I'm getting the no resource found that matches the given name. I've double checked for typos and it used to work, but now I'm popping up with all these errors saying it can't find my strings in my strings.xml.

这些是那些我得到的错误在我的main.xml中。

These are the ones I'm getting errors for in my main.xml.

    <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="10dip"
    android:text="@string/instructions"    />

    <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="10dip"
    android:text="@string/level_prompt"    />

    <Spinner
    android:id="@+id/spinner"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:prompt="@string/level_array"    />

这些是那些我得到了我的Andr​​oidManifest.xml中。

These are the ones I'm getting for my androidmanifest.xml.

<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".HelloFormStuff" android:label="@string/title">

这是我的strings.xml中的样子。

This is what my strings.xml looks like.

<string name="title">Title</string>
<string name="app_name">Application name</string>

<string name="instructions">Enter instructions here.</string>

<string name="level_prompt">Choose an item</string>

<string-array name="level_array">
<item>Item One</item>
<item>Item Two</item>
<item>Item Three</item>
<item>Item Four</item>
</string-array>

任何想法?任何帮助将是AP preciated !!

Any ideas? Any help would be appreciated!!

推荐答案

意外移动的价值观文件夹中的资源文件夹之外。迁回来,并解雇了!

Accidentally moved the "values" folder outside of the "res" folder. Moved it back and it fired up!

这篇关于使用Eclipse Android的错误 - 没有资源的发现,匹配给定的名字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 01:36