Android Question exoplayer error-> invokedynamic requires --min-sdk-version >= 26

analizer3816

Member
Licensed User
Longtime User
Hello,
I create b4a_exoplayer library from https://github.com/AnywhereSoftware/B4A_ExoPlayer
with exoplayer 2.9.0's aar file, compile ok

then I use this library in B4A 8.50
1.set min sdk = 16, target sdk = 28
2.set v28 android.jar in configure paths

exoplayer release note:
https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md
  • Turn on Java 8 compiler support for the ExoPlayer library. Apps may need to add compileOptions { targetCompatibility JavaVersion.VERSION_1_8 } to their gradle settings to ensure bytecode compatibility.
  • Set compileSdkVersion and targetSdkVersion to 28.
it shows error
B4X:
Convert byte code - optimized dex.    Error
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
    at com.android.dx.command.dexer.Main.runMultiDex(Main.java:370)
    at com.android.dx.command.dexer.Main.runDx(Main.java:291)
    at com.android.dx.command.dexer.Main.main(Main.java:249)
    at com.android.dx.command.Main.main(Main.java:94)
Caused by: java.lang.InterruptedException: Too many errors
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:684)
    ... 4 more

then I set minsdk=26 but it still this error

how I fixed this error?
thanks
 
Top