android-How to solve 'Static interface methods are only supported starting with Android N'
1. The purpose of this post
I would demo how to solve this error when using android studio
2. Environments
- Android Studio 3.x
- gradle wrapper version:
- distributionUrl=https://services.gradle.org/distributions/gradle-5.4.1-all.zip
- project build.gradle
- classpath ‘com.android.tools.build:gradle:3.5.0’
3. Solution and Code
Because some features need java 8 support,just add this compile options in the app’s build.gradle
You can get more info about android and java8 support by this official document.
Clean,rebuild and run the app, everything works.