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

Discussion in 'Android Questions' started by analizer3816, Oct 27, 2018.

  1. analizer3816

    analizer3816 Member Licensed 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
    Code:
    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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Why aren't you using the already built ExoPlayer library?

    Check whether you can build this library with Java 7 compatibility.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice