Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/201.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 错误:没有与给定名称匹配的重新资源(在“label”处,值为“@string/about”title“;_Java_Android - Fatal编程技术网

Java 错误:没有与给定名称匹配的重新资源(在“label”处,值为“@string/about”title“;

Java 错误:没有与给定名称匹配的重新资源(在“label”处,值为“@string/about”title“;,java,android,Java,Android,嘿,伙计们,我正在关注Hello Android 3ed版中的数独教程,我无法摆脱这个错误,这是我的文件 manifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.example.sudoku" android:versionCode="1"

嘿,伙计们,我正在关注Hello Android 3ed版中的数独教程,我无法摆脱这个错误,这是我的文件

manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="org.example.sudoku"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".Sudoku"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
<activity android:name=".About"
android:label="@string/about_title" >
</activity>


    </application>
    <uses-sdk android:minSdkVersion="8" />

</manifest> 

strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">Sudoku</string>
    <string name="main_title">Android Sudoku</string>
    <string name="continue_label">Continue</string>
    <string name="new_game_label">New Game</string>
    <string name="about_label">About</string>
    <string name="about_text">\
Sudoku is a logic-based number placement puzzle.
Starting with a partially completed 9x9 grid, the
objective is to fill the grid so that each row, 
each column, and each of the 3x3 boxes contains 
the digits
1 to 9 exactly once.
</string>
    <string name="exit_label">Exit</string>
</resources>

数独
安卓数独
继续
新游戏
关于
\
数独是一个基于逻辑的数字布局难题。
从部分完成的9x9网格开始
目标是填充网格,以便每行,
每列和每个3x3框包含
数字
1到9正好一次。
出口
关于.xml

<?xml version="1.0" encoding="UTF-8"?>
<ScrollView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:padding="10dip" >
     <TextView
     android:id="@+id/about_content"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="@string/about_text" />
     </ScrollView>  


好吧,这个错误说明了一切。您引用的字符串id为
about_title
,但这样的字符串没有在strings.xml中定义。也许,您可以将其更改为
about_label
,这确实是定义的。

您的string.xml中没有
about_title
字符串。只需添加它,就可以了。是吗关于标签的意思

我也有同样的问题。删除
“@string”
,效果很好

android:label="@string/about_title"  ->  android:label="about_title"

这将使标签值“about_title”,这不是提问者想要的:)