找不到与给定名称匹配的资源(在'label'处有值)

时间:2015-05-19 03:00:47

标签: android xml compiler-errors

所以我遇到了这个问题试图获取我签名的APK,我已经在我的strings.xml中引用它并尝试删除它并重写它似乎没有任何工作这是我的Manifest.XML。我在编码和东西方面都是一个菜鸟,所以一个简单而彻底的解释会有所帮助

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.chattr.chattr"
    android:versionCode="1"
    android:versionName="1.0" >

     <uses-sdk
         android:minSdkVersion="15"
         android:targetSdkVersion="21" />

        <permission android:name="android.permission.INTERNET" />
        <permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <!-- To auto-complete the email text field in the login form with the      user's emails -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.READ_PROFILE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.chattr.chattr.MainActivity"
            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="com.chattr.chattr.LoginActivity"
            android:label="@string/title_activity_login"
            android:windowSoftInputMode="adjustResize|stateVisible" >
        </activity>
        <activity
            android:name="com.chattr.chattr.ListUsersActivity"
            android:label="@string/title_activity_list_users" >
        </activity>
        <activity
            android:name="com.chattr.chattr.MessagingActivity"
            android:label="@string/title_activity_messaging" >
        </activity>

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    </application>

</manifest>

这是我的风格。 XML

    <?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="app_name">MessagingTutorial</string>
    <string name="login_activity_label">Sinch Messaging Tutorial</string>
    <string name="username">USERNAME</string>
    <string name="password">PASSWORD</string>
    <string name="title_activity_list_users">ListUsersActivity</string>
    <string name="hello_world">Hello world!</string>
    <string name="action_settings">Settings</string>
    <string name="message_elipses">Message...</string>
    <string name="logout">Logout</string>
    <string name="messaging_activity">Messaging</string>

</resources>

1 个答案:

答案 0 :(得分:4)

您的清单引用了@string/foo下资源文件中不存在的字符串资源(res/values)。例如,您发布的资源文件中缺少字符串title_activity_logintitle_activity_messaging