Closed MarcusWolschon closed 6 years ago
This means that neither compileSdkVersion nor targetSdkVersion can be higher then 24 (e.g. 27)
Gradle allowed to force the version of a dependency. And the SDK can survive it . Therefore, compileSdkVersion
and targetSdkVersion
can of course be greater than 24.
The code could be for instance in the android node of the build.gradle script:
configurations.all {
resolutionStrategy {
force 'com.android.support:appcompat-v7:27.0.2'
force 'com.android.support:support-v4:27.0.2'
force 'com.android.support:appcompat-v7:27.0.2'
force 'com.android.support:cardview-v7:27.0.2'
force 'com.android.support:design:27.0.2'
}
}
Declaring these dependencies in the build.gradle
and excluding the support group from the sdk works as well.
Forcing a version number is not an acceptable solution.
@MarcusWolschon implementation('com.sumup:merchant-sdk:3.0.0'){ exclude group: 'com.android.support', module: 'appcompat-v7' }
actually:
implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.android.support:support-v4:$support_version"
implementation "com.android.support:design:$support_version"
implementation "com.android.support:cardview-v7:$support_version" // for sumup
implementation "com.android.support:support-core-utils:$support_version"
implementation "com.android.support:support-annotations:$support_version"
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
//implementation 'com.sumup:merchant-sdk:3.0.0'
implementation('com.sumup:merchant-sdk:3.0.0'){
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'cardview-v7'
exclude group: 'com.android.support', module: 'support-annotations'
}
The sumup SDK includes com.android.support:appcompat-v7:24.2.1 and thus prevents the applications from including com.android.support:appcompat-v7:27.0.2 without conflicts