0

PS D:\app> flutter clean .0s Deleting .dart_tool... 8ms Deleting Generated.xcconfig... 1ms Deleting flutter_export_environment.sh... 1ms Deleting ephemeral... 2ms PS D:\app> flutter run
Running "flutter pub get" in app... Resolving dependencies... characters 1.2.1 (1.3.0 available) collection 1.17.0 (1.17.1 available) js 0.6.5 (0.6.7 available) matcher 0.12.13 (0.12.14 available) meta 1.8.0 (1.9.0 available) path 1.8.2 (1.8.3 available) test_api 0.4.16 (0.4.18 available) **Got dependencies! Launching lib\main.dart on moto g 5G in debug mode...

FAILURE: Build failed with an exception.

  • What went wrong: Could not open settings generic class cache for settings file 'D:\app\android\settings.gradle' (C:\Users\karth.gradle\caches\7.5\scripts\3d075fs9hjp81ny0sgym4v09w).

BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

BUILD FAILED in 40s Running Gradle task 'assembleDebug'... 41.5s Exception: Gradle task assembleDebug failed with exit code 1**

This is the error that iam always getting i try these method : Open a command prompt or terminal window. Navigate to the root of your Flutter project using the cd command. Delete the .gradle folder using the rd /s /q .gradle command on Windows or rm -rf .gradle command on Linux/Mac. Run flutter run again and see if the issue is resolved.

If that doesn't work, you can try the following steps:

Open Android Studio and load your Flutter project.
Go to File > Invalidate Caches / Restart.
In the popup that appears, click on the "Invalidate and Restart" button.
Wait for Android Studio to finish restarting.
Open a command prompt or terminal window and navigate to the root of your Flutter project.
Run flutter clean to clean your project's build artifacts.
Run flutter run again and see if the issue is resolved. 

I there is any other way Please help to this world.. by your solution.

I there is any other way Please help to this world.. by your solution.

1 Answers1

0

Looks like this is due to upgrading Android Studio... Please check if your Android Studio files are correct... what i mean is go to the Android studio root folder

C:\Program Files\Android\Android Studio\jre\

Inside these folders check if you have this structure android studio electic eel jre folder structure

if not then u will need to copy the files inside a folder named "jbr" and paste all the files from "jbr" to folder "jre"

Anand
  • 323
  • 1
  • 8