Flutter Unsupported class file major version 63 Android studio
Asked Answered
P

5

10

I'm getting error after update the Android version and flutter version. Right now I want add the "file_picker: ^5.2.5", and "cached_network_image: ^3.2.3" plugin so getting "General error during conversion: Unsupported class file major version 63" error. I have checked many solution but nothing one to help me. Please help me for fix this issue.

Flutter version:- Flutter 3.3.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 18a827f393 (4 months ago) • 2022-09-28 10:03:14 -0700 Engine • revision 5c984c26eb Tools • Dart 2.18.2 • DevTools 2.15.0

Android Studio version:- Android Studio Electric Eel | 2022.1.1 Build #AI-221.6008.13.2211.9477386, built on January 11, 2023 Runtime version: 11.0.15+0-b2043.56-8887301 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.1 GC: G1 Young Generation, G1 Old Generation Memory: 1280M Cores: 8 Registry: external.system.auto.import.disabled=true ide.text.editor.with.preview.show.floating.toolbar=false

Non-Bundled Plugins: com.github.dhaval2404.material_icon_generator (1.3) Dart (221.6091) pl.pszklarska.pubversionchecker (1.3.5) io.flutter (71.2.4)

enter image description here

Pellicle answered 18/1, 2023 at 5:40 Comment(2)
Please add error as code.Artisan
In the screenshot all are covered.Pellicle
E
20

I finally found the solution of this problem :-

soo just go at your project folder and then open android/gradle/wrapper/gradle-wrapper-properties then change this :-

distributionUrl=https://services.gradle.org/distributions/gradle-7.4-all.zip

To This :-

distributionUrl=https://services.gradle.org/distributions/gradle-7.6-all.zip

and then your issue get solved 😁

Embattle answered 26/1, 2023 at 6:57 Comment(0)
N
6

tl;dr Update Android Studio and Gradle Versions

I encountered this error while trying to run Flutter integration tests on Firebase Test Lab. I was able to solve this by updating a few things in Android Studio.

Update the Project's JDK

  1. Open the Android Studio Project Structure page (File -> Project Structure)

  2. Click the "SDKs" tab

  3. Download the newest JDK version and add it to the list enter image description here enter image description here

  4. Click the "Project" tab

  5. Update the SDK field to the new JDK enter image description here

Update com.android.tools.build:gradle

In android/build.gradle, update the com.android.tools.build:gradle value to the latest version found here.

 dependencies {
        classpath 'com.android.tools.build:gradle:7.4.1'
        ...
    }

Update the gradle distributionUrl

In android/gradle/wrapper/gradle-wrapper.properties, update the distributionUrl property to use the latest Gradle version.

distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
Nador answered 8/2, 2023 at 16:23 Comment(0)
F
1
  1. Go to this location(C:\Program Files\Android\Android Studio\jbr)
  2. Copy all the files from here
  3. paste all the copied files in (jre) folder
  4. Open your cmd and run flutter doctor again.
Farrah answered 24/1, 2023 at 12:57 Comment(0)
B
0

Check flutter doctor status. The issue likely is in the java bundle.

Bonbon answered 21/1, 2023 at 10:50 Comment(2)
Yes but how can i fix this issue. Please suggest.Pellicle
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Willett
I
0

checkjava --version in the terminal.

For me the issue was that it was using jdk 22 instead of jdk 17. Installing jdk 17 explicitly and exporting it to the PATH solved the issue for me.

Indign answered 4/9 at 10:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.