java清单合并失败:usessdk:minsdk版本8不能更小
问题是
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version L declared in library com.安卓.support:support-v4:21.0.0-rc1
代码正在生成中。格拉德尔
apply plugin: '安卓'
安卓 {
compileSdkVersion 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.安卓example.gcm"
minSdkVersion 8
targetSdkVersion 16
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-安卓.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.安卓.support:support-v4:+'
compile 'com.google.安卓.gms:play-services:+'
//compile 'com.安卓.support:support-v4:20.0.0'
//compile 'com.google.安卓.gms:play-services:5.0.77'
}
AndroidManifest中的代码是
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:安卓="http://schemas.安卓.com/apk/res/安卓"
package="com.安卓example.gcm"
安卓:versionCode="1"
安卓:versionName="1.0" >
<!-- GCM requires Android SDK version 2.2 (API level 8) or above. -->
<uses-sdk
安卓:minSdkVersion="8"
安卓:targetSdkVersion="16" />
<!-- Main activity. -->
<application
安卓:name="com.安卓example.gcm.Controller"
安卓:icon="@drawable/ic_launcher"
安卓:label="@string/app_name" >
<!-- Register Activity -->
<activity
安卓:name="com.安卓example.gcm.RegisterActivity"
安卓:label="@string/app_name" >
<intent-filter>
<action 安卓:name="安卓.intent.action.MAIN" />
<category 安卓:name="安卓.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action 安卓:name="安卓.intent.action.VIEW" />
<action 安卓:name="安卓.intent.action.DELETE" />
<category 安卓:name="安卓.intent.category.DEFAULT" />
<data 安卓:scheme="com.idrivecare.familypro" />
</intent-filter>
</activity>
<!-- Main Activity -->
<activity
安卓:name="com.安卓example.gcm.MainActivity"
安卓:configChanges="orientation|keyboardHidden"
安卓:label="@string/app_name" >
</activity>
<receiver
安卓:name="com.google.安卓.gcm.GCMBroadcastReceiver"
安卓:permission="com.google.安卓.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action 安卓:name="com.google.安卓.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action 安卓:name="com.google.安卓.c2dm.intent.REGISTRATION" />
<category 安卓:name="com.安卓example.gcm" />
</intent-filter>
</receiver>
<service 安卓:name="com.安卓example.gcm.GCMIntentService" />
<meta-data 安卓:name="com.google.安卓.gms.version" 安卓:value="@integer/google_play_services_version" />
</application>
<!-- GCM connects to Internet Services. -->
<uses-permission 安卓:name="安卓.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission 安卓:name="安卓.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission 安卓:name="安卓.permission.WAKE_LOCK" />
<!-- Creates a custom permission so only this app can receive its messages. -->
<permission
安卓:name="com.安卓example.gcm.permission.C2D_MESSAGE"
安卓:protectionLevel="signature" />
<uses-permission 安卓:name="com.安卓example.gcm.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive data message. -->
<uses-permission 安卓:name="com.google.安卓.c2dm.permission.RECEIVE" />
<!-- Network State Permissions to detect Internet status -->
<uses-permission 安卓:name="安卓.permission.ACCESS_NETWORK_STATE" />
<!-- Permission to vibrate -->
<uses-permission 安卓:name="安卓.permission.VIBRATE" />
</manifest>
谢谢你,先生
共 (0) 个答案