It may be that the jar package compiled by a higher version of java is relied on, and the java version used at runtime is not high enough. It may not be a problem with your own code, it may be a dependent jar package
I also encountered this problem two days ago. After thinking about it, I seemed to have updated the Android N SDK and tried to delete the N SDK. Now I don’t have this problem. I don’t know if it is the same as you.
It may be that the jar package compiled by a higher version of java is relied on, and the java version used at runtime is not high enough. It may not be a problem with your own code, it may be a dependent jar package
A jar package referenced by java was compiled using "-target version"
http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html
http://blog.sina.com.cn/s/blog_64ecfc2f0102uxu6.html
Changed to jdk1.8 and the problem was solved. It’s a painful version
I also encountered this problem two days ago. After thinking about it, I seemed to have updated the Android N SDK and tried to delete the N SDK. Now I don’t have this problem. I don’t know if it is the same as you.