this is my code and it says that the error is i used a small version of minsdkversion ? how can i fix it ?
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.ismailtaibi.ismagame.spidermanjamp"
minSdkVersion 11
targetSdkVersion 23
ndk {
moduleName "player_shared"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.google.android.gms:play-services:+'
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/support-v4-19.0.1.jar')
}
and this is the error
Error:C:\Users\ismaprod\StudioProjects\android3\app\src\main\AndroidManifest.xml:7:5-73 Error: uses-sdk:minSdkVersion 11 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:11.0.4] C:\Users\ismaprod.gradle\caches\transforms-1\files-1.1\play-services-11.0.4.aar\05bb078fa695de7980fb2889ef215c7e\AndroidManifest.xml as the library might be using APIs not available in 11 Suggestion: use a compatible library with a minSdk of at most 11, or increase this project's minSdk version to at least 14, or use tools:overrideLibrary="com.google.android.gms.play_services" to force usage (may lead to runtime failures) FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 11 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:11.0.4] C:\Users\ismaprod.gradle\caches\transforms-1\files-1.1\play-services-11.0.4.aar\05bb078fa695de7980fb2889ef215c7e\AndroidManifest.xml as the library might be using APIs not available in 11 Suggestion: use a compatible library with a minSdk of at most 11, or increase this project's minSdk version to at least 14, or use tools:overrideLibrary="com.google.android.gms.play_services" to force usage (may lead to runtime failures)
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org BUILD FAILED in 7s
In your dependencies, you have
compile 'com.google.android.gms:play-services:+'
This dependecy need the Android SDK 14 or higher. TO fix this, change your min Android SDK version to 14 :
minSdkVersion 14
Edit : set Compile SDK Version to the same value as Build tools version :
compileSdkVersion 27
buildToolsVersion "27.0.3"