找不到与gradle匹配给定名称的资源

时间:2015-11-17 14:44:50

标签: android gradle

嗨伙计我得到3个错误: intermediates \ manifests \ full \ debug \ AndroidManifest.xml:22:24-39:找不到与给定名称匹配的资源(在'theme'处,值为'@ style / AppTheme')。

我得到另外两个属性的相同错误: @字符串/ APP_NAME @绘制/ ic_logo

ic_logo位于res / drawable-xxhdpi

这是我的gradle脚本:

apply plugin: 'com.android.application'
apply plugin: 'maven'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 23
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

repositories {
    mavenLocal()
}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.android.support:design:23.1.0'
    compile 'com.android.support:recyclerview-v7:23.1.0'
    compile 'com.android.support:gridlayout-v7:23.1.0'
    compile 'com.mycompany.android:myvolley:1.0.0-SNAPSHOT'
}

这是我的清单

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mycompany.appname"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="9"
        android:targetSdkVersion="23" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application
        android:allowBackup="true"
        android:supportsRtl="false"
        android:icon="@drawable/ic_logo"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:name=".MyApplication" >
        <activity
            android:name=".activities.SplashScreencreen"        
            android:noHistory="true"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Black.NoTitleBar" >

        </activity>
        <activity
            android:name=".activities.LoginActivity"
            android:launchMode="singleTask"
            android:noHistory="true"
            android:screenOrientation="portrait" >
             <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".activities.MainActivity" />
        </activity>
        <activity
            android:name=".activities.SignupActivity"
            android:launchMode="singleTask"
            android:noHistory="true"
            android:screenOrientation="portrait" >
              <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".activities.MainActivity" />
        </activity>
        <activity
            android:name=".activities.UpdateUserDetailsActivity"
            android:launchMode="singleTask"
            android:noHistory="true"
            android:screenOrientation="portrait" >
               <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".activities.MainActivity" />
        </activity>
        <activity
            android:name=".activities.OrderActivity"
            android:launchMode="singleTask"
            android:noHistory="true"
            android:screenOrientation="portrait" >
               <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".activities.MainActivity" />
        </activity>
        <activity
            android:name=".activities.MainActivity"       
            android:launchMode="singleTask"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustNothing" >

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

            <!-- adjustNothing makes the layout not being pushed when keyboard is on. Try adjustResize -->
        </activity>
        <activity
            android:name=".activities.BaseServiceListActivity"
            android:launchMode="singleTask"
            android:screenOrientation="portrait" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".activities.MainActivity" />
        </activity>

        <!-- Drawer Activities -->
        <activity
            android:name=".activities.ApartmentInfoActivity"
            android:launchMode="singleTask"
            android:noHistory="true"
            android:screenOrientation="portrait" >
        </activity>

        <!-- Services -->
        <service android:name=".services.UpdateDataIntentService"/>
    </application>

</manifest>

请帮助

感谢

0 个答案:

没有答案