Anytime I try to build SNAPSHOT 0.9 or 0.10 with anything but Min SDK >= 26, I get this error:
Error:Execution failed for task ‘:app:transformClassesWithDexBuilderForDebug’.
com.android.build.api.transform.TransformException: org.gradle.tooling.BuildException: com.android.dx.cf.code.SimException: signature-polymorphic method called without --min-sdk-version >= 26
Anyone have any idea how to support previous versions of android? I need to go back at least as far as SDK 21.
Here is my app level build.gradle:
apply plugin: ‘com.android.application’
apply plugin: ‘kotlin-android’
apply plugin: ‘kotlin-android-extensions’
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.graphhopper.android"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner”
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
}
}
}
dependencies {
implementation fileTree(dir: ‘libs’, include: [’*.jar’])
implementation 'com.android.support:appcompat-v7:26.1.0’
implementation 'com.android.support:support-v4:26.1.0’
implementation 'com.android.support:design:26.1.0’
implementation 'com.android.support.constraint:constraint-layout:1.0.2’
testImplementation 'junit:junit:4.12’
androidTestImplementation(‘com.android.support.test.espresso:espresso-core:3.0.1’, {
exclude group: ‘com.android.support’, module: ‘support-annotations’
})
implementation “org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version”
compile(group: 'com.graphhopper', name: 'graphhopper-core', version: '0.9-SNAPSHOT') {
exclude group: 'com.google.protobuf', module: 'protobuf-java'
exclude group: 'org.openstreetmap.osmosis', module: 'osmosis-osm-binary'
exclude group: 'org.apache.xmlgraphics', module: 'xmlgraphics-commons'
}
compile 'org.mapsforge:vtm:0.8.0'
compile 'org.mapsforge:vtm-android:0.8.0'
compile 'org.mapsforge:vtm-android:0.8.0:natives-armeabi'
compile 'org.mapsforge:vtm-android:0.8.0:natives-armeabi-v7a'
compile 'org.mapsforge:vtm-android:0.8.0:natives-x86'
compile('org.mapsforge:vtm-jts:0.8.0') {
exclude group: 'com.vividsolutions', module: 'jts-core'
}
compile 'org.mapsforge:vtm-themes:0.8.0'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
// compile ‘com.vividsolutions:jts-core:1.14.0’
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'org.slf4j:slf4j-android:1.7.25'
compile 'com.github.MKergall:osmbonuspack:6.4'
// Google Location and Activity Recognition
implementation 'com.google.android.gms:play-services-location:11.4.0'
}
And project level build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.4-3’
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url “https://oss.sonatype.org/content/groups/public/” }
maven { url “https://jitpack.io” }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}