Why do we get this error in Android Studio 3.0 RC1?
com.android.dx.cf.code.SimException:
default or static interface method used without --min-sdk-version
If the java-library that you're talking about was guava, you can try to upgrade it to the latest android-specific build
implementation 'com.google.guava:guava:23.0-android'
This fixed for me
If this error occurs due to Guava, then the solution, as per the official documentation from Google is: https://github.com/google/guava
Change the dependency to (version is current as of this writing):
api 'com.google.guava:guava:27.0-android'
This fixed the issue for me.
From guava v24 we have two alternative versions: Android or JRE. So, in this case you need to include the dependency as:
compile 'com.google.guava:guava:24.1-android'
Find all the details within the repo: https://github.com/google/guava
I just found out that it works as expected when I activate the D8 dexer which is planned to be the default for Android Studio 3.1
In the project gradle.properties
, add:
android.enableD8=true
Now the code compiles as expected and I still get the expected linter messages.