I am trying to add an android library with Java 8 features to Unity. I get the following error while trying to build:
CommandInvokationFailure: Unable to convert classes into dex format.
/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“/Users/abhipray/Library/Android/sdk/tools” -Dfile.encoding=UTF8 -jar “/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar” -
stderr[
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
1 error; aborting
]
I don’t see an option for min-sdk-version as 26 via player settings using unity 2017.3.0b8.
How do I set the min-sdk-version to 26 or is there another solution to this error?