The problem is..
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1
The code in build.gradle
apply plugin: 'android' android { compileSdkVersion 19 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.androidexample.gcm" minSdkVersion 8 targetSdkVersion 16 } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile 'com.android.support:support-v4:+' compile 'com.google.android.gms:play-services:+' //compile 'com.android.support:support-v4:20.0.0' //compile 'com.google.android.gms:play-services:5.0.77' }
Code in the AndroidManifest is ..
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.androidexample.gcm" android:versionCode="1" android:versionName="1.0" > <!-- GCM requires Android SDK version 2.2 (API level 8) or above. --> <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" /> <!-- Main activity. --> <application android:name="com.androidexample.gcm.Controller" android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <!-- Register Activity --> <activity android:name="com.androidexample.gcm.RegisterActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.DELETE" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="com.idrivecare.familypro" /> </intent-filter> </activity> <!-- Main Activity --> <activity android:name="com.androidexample.gcm.MainActivity" android:configChanges="orientation|keyboardHidden" android:label="@string/app_name" > </activity> <receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" > <intent-filter> <!-- Receives the actual messages. --> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <!-- Receives the registration id. --> <action android:name="com.google.android.c2dm.intent.REGISTRATION" /> <category android:name="com.androidexample.gcm" /> </intent-filter> </receiver> <service android:name="com.androidexample.gcm.GCMIntentService" /> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> </application> <!-- GCM connects to Internet Services. --> <uses-permission android:name="android.permission.INTERNET" /> <!-- GCM requires a Google account. --> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <!-- Keeps the processor from sleeping when a message is received. --> <uses-permission android:name="android.permission.WAKE_LOCK" /> <!-- Creates a custom permission so only this app can receive its messages. --> <permission android:name="com.androidexample.gcm.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="com.androidexample.gcm.permission.C2D_MESSAGE" /> <!-- This app has permission to register and receive data message. --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <!-- Network State Permissions to detect Internet status --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- Permission to vibrate --> <uses-permission android:name="android.permission.VIBRATE" /> </manifest>
Thank you sir..
The initial process would be to open the manifest application known as the AndroidManifest. xml and then click on the Merged Manifest tab below your edit pane. Following which, Click on the merged manifest option. An Error would be visible at the right column and then one must try to solve the error.
check it: Android Studio->file->project structure->app->flavors->min sdk version and if you want to run your application on your mobile you have to set min sdk version less than your device sdk(API) you can install any API levels. Show activity on this post. Set the min SDK version in your project's AndroidManifest.
To change Android minSdkVersion in Flutter for the project created after the 2.8 update, you have to make changes in the local. properties file and then reference the new variable from the local. properties file inside the build. gradle file.
The problem is because your app min sdk is 8 and you selected to use the Google Plus services that requires min sdk 9.
Change the line "minSdkVersion 8" to "minSdkVersion 9". So, save it.
After, Clean Project and Rebuild it.
If you use
'com.android.support:support-v4:+'
It will suppose it can use 21.x since is the latest version (but not compatible with target less than L)
Change it to
'com.android.support:support-v4:20.+'
So it will download the latest 20.x version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With