I'm trying to add a wearable module to my existing android (min sdk version 16) app. If I run the app (release mode), I'm getting this error:
Error:Execution failed for task ':app:processReleaseManifest'. Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 25 declared in library [Wear App sub-manifest] c:\workspaces\sampleapp\android\app\build\generated\manifests\microapk\release\AndroidManifest.xml Suggestion: use tools:overrideLibrary="" to force usage
I don't want to increase the minSdkVersion. So how can I fix the issue without changing minSdkVersion of my app?
here are my gradle files:
phone app
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
[...]
}
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
repositories {
jcenter()
maven {
url "https://maven.java.net/content/groups/public/"
}
}
defaultConfig {
applicationId "com.sample.app"
minSdkVersion 16
targetSdkVersion 25
signingConfig signingConfigs.config
}
buildTypes {
release {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
[...]
compile 'com.google.android.gms:play-services-wearable:10.2.0'
wearApp project(':sample-wear')
}
apply plugin: 'com.google.gms.google-services'
waerable app
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
signingConfigs {
config {
[...]
}
}
defaultConfig {
applicationId "com.sample.app"
minSdkVersion 23
targetSdkVersion 25
versionCode 1
versionName "1.0"
signingConfig signingConfigs.config
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.support:wearable:2.0.0'
compile 'com.google.android.gms:play-services-wearable:10.2.0'
provided 'com.google.android.wearable:wearable:2.0.0'
}
Note: The error occurs only with Gradle 2.3.0. Gradle 2.2.3 works as expected...
Similar issue on code.google.com: https://code.google.com/p/android/issues/detail?id=232834
In your gradle file just update the minSdkVersion into 23
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.oaics.customer"
minSdkVersion 23
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
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