Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Can't run 6.0.0-x on Lollipop? #11378

Closed
Closed

Description

@leelx78

Hi,
version 5.5.0 compiles and runs fine but 6.6.0-beta.3 has this issue on Android Studio when RUNNING the app (the project build runs fine)

Error:Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)

and

Invoke-customs are only supported starting with Android O (--min-api 26)
com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex '/Users/qq/.gradle/caches/transforms-1/files-1.1/mapbox-android-sdk-6.0.0-beta.3.aar/deab756594fb90ee5107d36fe1944279/jars/classes.jar' to '/Users/qq/Android/AndroidStudioProjects/proj/maps/build/intermediates/transforms/preDex/flavor/release/5.jar'

I'm using Android Studio 3.1 beta but I had the same issue with the stable AS version

Compile SDK set to 27.0.3

I need to have minSDK 21 for the application though. Is version 6 running on that?

Thanks

Activity

  1. added
    Android
    on Mar 5, 2018
  2. LukasPaczos commented on Mar 5, 2018

    @LukasPaczos
    Contributor

    Thanks for reporting your issue @leelx78. Our upcoming 6.0.0 release includes support for Java 8 features, therefore in order to run it (or any of the betas) you need to upgrade your project to include Java 8 support by adding this into you app's gradle file:

    android {
        ...
        ...
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
    

    or enabling Java 8 support for your project from Android Studio menu.

  3. leelx78 commented on Mar 5, 2018

    @leelx78
    Author

    Thanks!

  4. paulkugaev commented on Aug 27, 2018

    @paulkugaev

    Does not work for me

  5. Xgamefactory commented on Sep 25, 2018

    @Xgamefactory

    we have same error even setting compileoptions for java version in gradle.

    dx tool failed: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: default or static interface method used without --min-sdk-version >= 24
    Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
    3 errors; aborting
    
  6. Xgamefactory commented on Oct 16, 2018

    @Xgamefactory

    i hope you wil remove these java8 problematic features soon.
    there are tons of problems with java8.

  7. Rajanchidambaram commented on Nov 19, 2019

    @Rajanchidambaram

    Follow these simple steps:

    1.Goto File ->Project Structrure
    2.Click on "Modules" at left side
    3.Choose the value as 1.8 in source compatibility
    4.Choose the value as 1..8 in target compatibility
    5.Click Apply and ok.
    6.Click on Build Menu item and Rebuild it.

  8. ManishPingale7 commented on Dec 1, 2020

    @ManishPingale7

    It worked for me
    Thanks!!

  9. dineshchavhan commented on Feb 9, 2021

    @dineshchavhan

    its worked, OMG thank you save my day

  10. dulakshanwije commented on Sep 15, 2021

    @dulakshanwije

    Its worked. Thank you

  11. Rutikpatil0123 commented on Sep 19, 2021

    @Rutikpatil0123

    Thanks dude for help!!

  12. Yasaswini-Dhulipala commented on Nov 30, 2021

    @Yasaswini-Dhulipala

    it worked thaks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidsupport

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions