any help? new to android studio - flutter

FAILURE: Build failed with an exception.
What went wrong:
Could not open settings generic class cache for settings file 'D:\devflut\projects\first_app\android\settings.gradle' (C:\Users\hp.gradle\caches\6.7\scripts\1fnwrr8g4rohfp291nvlxj5qe).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60
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.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1

Related

Running Android Virtual device

FAILURE: Build failed with an exception.
Could not open cp_proj generic class cache for build file 'C:\Users\tejma\AndroidStudioProjects\tej_phone\android\build.gradle' (C:\Users\tejma.gradle\caches\7.5\scripts\aelkctnjop4vj2ju14u2tlz7m).
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.
Get more help at https://help.gradle.org
BUILD FAILED in 879ms
Running Gradle task 'assembleDebug'... 1,569ms
Exception: Gradle task assembleDebug failed with exit code 1
Not running android studio virtual device

I deleted some of my files in my C-drive after that my flutter project is not running and showing this exception

FAILURE: Build failed with an exception.
Where:
Settings file 'C:\Users\hassa\development\GIFT-Transport-Management-System\gtms\android\settings.gradle' line: 11
What went wrong:
A problem occurred evaluating settings 'android'.
Failed to deserialize script metadata extracted for script 'C:\flutter\flutter\packages\flutter_tools\gradle\app_plugin_loader.gradle'
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.
Get more help at https://help.gradle.org
BUILD FAILED in 4s
Exception: Gradle task assembleDebug failed with exit code 1
I tried to delete some of the files.

flutter build in error does not run in android

FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\sajid\Desktop\amazon_clonee\android\app\build.gradle' line: 25
What went wrong:
A problem occurred evaluating project ':app'.
Could not get unknown property 'plugin' for project ':app' of type org.gradle.api.Project.
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.
Get more help at https://help.gradle.org
BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1
Any one solve this error

Could not load compiled classes for script 'C:\src\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' from cache

how can i solve this error ?
FAILURE: Build failed with an exception.
Where:
Build file 'E:\00-flutter_project\crypto_predection\android\app\build.gradle' line: 26
What went wrong:
A problem occurred evaluating project ':app'.
Could not load compiled classes for script 'C:\src\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' from cache.
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.
Get more help at https://help.gradle.org
BUILD FAILED in 2m 33s
Exception: Gradle task assembleDebug failed with exit code 1

Flutter - audio_session - Could not load compiled classes for build file build.gradle from cache

I am trying to run my flutter project but facing this issue.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':audio_session'.
> Could not load compiled classes for build file 'C:\flutter_2.5.2\.pub-cache\hosted\pub.dartlang.org\audio_session-0.1.6+1\android\build.gradle' from cache.
* 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1
I have tried deleting audio_session-0.1.6+1 from the path C:\flutter_2.5.2\.pub-cache\hosted\pub.dartlang.org\ but it didn't work. It is creating the package folder again and again when I build the APK.