1
votes

i made this app using flutter in android studio and when i try to release the app i get this error:

Error:Android Pre Dex: [flutter.jar] Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView:(Lio/flutter/embedding/engine/systemchannels/PlatformViewsChannel$PlatformViewCreationRequest;)J: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)

Error:Android Pre Dex: [flutter.jar] Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in io.flutter.view.AccessibilityBridge.shouldSetCollectionInfo:(Lio/flutter/view/AccessibilityBridge$SemanticsNode;)Z: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13) 11

and this is my flutter doctor output:

[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.17763.864], locale en-US)
    • Flutter version 1.9.1+hotfix.6 at D:\flutter
    • Framework revision 68587a0916 (2 months ago), 2019-09-13 19:46:58 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\user\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.
Process finished with exit code 0

Thanks in advance for any help.

2

2 Answers

0
votes

@Emad, yes. I think you will need to upgrade your Java to 11. Here is more related to this.

0
votes

If you go to

File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler

There's an option to Use '--release' option which, if ticked, requires Java 9 or later. Unticking this or updating your Java may solve things for you.