florent37 / RxGps

Finding current location cannot be easier on Android !
Apache License 2.0
300 stars 42 forks source link

Java Compiler and Android error when build the project with RxGps #13

Closed cuongmanhvo162 closed 5 years ago

cuongmanhvo162 commented 5 years ago

Hello, I got the error message below

Java Compiler
com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/.gradle/caches/transforms-1/files-1.1/rxgps-1.0.2.aar/9ec52c309174054150f40843f57f8146/jars/classes.jar com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
com.android.tools.r8.CompilationFailedException: Compilation failed to complete com.android.tools.r8.utils.AbortException: Error: Invoke-customs are only supported starting with Android O (--min-api 26)

Android Error Invoke-customs are only supported starting with Android O (--min-api 26)

My culprit is, I use both RxPermission and RxGps altogether.

cuongmanhvo162 commented 5 years ago

This is my mistake. Only need to add compile option to solve this issue.

compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }