After trying to run a project, an error appears:
Gradle: [AndroidManifest.xml:6, AndroidManifest.xml:3] Main manifest has <uses-sdk android:minSdkVersion='14'> but library uses minSdkVersion='19'
Gradle: Execution failed for task ':myApp:processDebugManifest'.
> Manifest merging failed. See console for more info.
build.gradle:
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6+'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/android-support-v4.jar')
compile files('libs/google-play-services.jar')
compile files('libs/systembartint.jar')
compile project(':GooglePlayServices')
}
android {
compileSdkVersion 17
buildToolsVersion '17.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
}
}
Manifest:
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
Used libraries: Google Maps, Android Support v4, SystemBarTint.
Looks like there is a minSdkVersion=19
in Manifest of library. But what's the name of that library? Google Maps is a module with minSdk
14 and target 19. SystemBarTint
with minSdk
10, I think. If I have to change manifest of library, how can I do it in jar file?
The library JAR files couldn't be causing this problem because they won't have manifest files that get merged. The problem has to be coming from the GooglePlayServices project that's in your dependencies. It's not clear what that is. If this isn't something of yours and you're just trying to use the Google Play Services library, there's an easier way. The easier way also replaces the way you've included the V4 support library.
In your SDK manager, make sure your Android Support Repository and Google Repository are installed.
Replace your dependencies block with this:
dependencies {
compile 'com.android.support:support-v4:19.0.+'
compile 'com.google.android.gms:play-services:4.0.+'
compile files('libs/systembartint.jar')
}
and remove the android-support-v4.jar
and google-play-services.jar
files from your libs directory.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments