Platform: Android Studio 3.1.1, com.android.tools.build:gradle:3.1.1, D8 dexer *
*Mapbox SDK version:6.0.0-beta.7
build success
BUILD FAILED
Caused by: com.android.tools.r8.utils.AbortException
at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:77)
at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:67)
at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:62)
... 10 more
Suppressed: com.android.tools.r8.ApiLevelException: Static interface methods are only supported starting with Android N (--min-api 24): com.mapbox.geojson.Geometry com.mapbox.geojson.Geometry.fromJson(java.lang.String)
at com.android.tools.r8.dex.FileWriter.checkInterfaceMethod(FileWriter.java:234)
at com.android.tools.r8.dex.FileWriter.checkInterfaceMethods(FileWriter.java:210)
at com.android.tools.r8.dex.FileWriter.generate(FileWriter.java:140)
at com.android.tools.r8.dex.ApplicationWriter.writeDexFile(ApplicationWriter.java:356)
at com.android.tools.r8.dex.ApplicationWriter.lambda$write$2(ApplicationWriter.java:188)
... 5 more
by disable D8 in gradle.properties
android.enableD8=false
there's only warnning about the Static interface methods and build success
Thank you for the report, the issue shown is related to a newer java 8 language feature. Please add the following to your build.gradle:
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
Doesn't work for me
Try to delete all files in build folder.
Most helpful comment
Thank you for the report, the issue shown is related to a newer java 8 language feature. Please add the following to your build.gradle: