Когда я пытаюсь запустить свое первое приложение Flutter, происходит следующее:
Код: Выделить всё
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\Angel\Downloads\Codigo\Flutter\first_app\android\settings.gradle' (C:\Users\Angel\.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 2s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 3.5s
Exception: Gradle task assembleDebug failed with exit code 1
Если это полезно, вот что получается при запуске «flutter run -v»:
Код: Выделить всё
[ +119 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +128 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +1 ms] 4d7946a68d26794349189cf21b3f68cc6fe61dcb
[ +2 ms] executing: [C:\src\flutter/] git tag --points-at 4d7946a68d26794349189cf21b3f68cc6fe61dcb
[ +107 ms] Exit code 0 from: git tag --points-at 4d7946a68d26794349189cf21b3f68cc6fe61dcb
[ ] 2.0.3
[ +85 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +77 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/stable
[ +1 ms] executing: [C:\src\flutter/] git ls-remote --get-url origin
[ +79 ms] Exit code 0 from: git ls-remote --get-url origin
[ +2 ms] https://github.com/flutter/flutter.git
[ +129 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD
[ +78 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ +188 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +6 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +124 ms] executing: C:\Users\Angel\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[ +82 ms] List of devices attached
R9HN50CEZ7J device product:a11qub model:SM_A115M device:a11q transport_id:4
[ +10 ms] C:\Users\Angel\AppData\Local\Android\sdk\platform-tools\adb.exe -s R9HN50CEZ7J shell getprop
[ +291 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ +14 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +217 ms] Skipping pub get: version match.
[ +268 ms] Generating
C:\Users\Angel\Downloads\Codigo\Flutter\first_app\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +129 ms] ro.hardware = qcom
[ +88 ms] Initializing file store
[ +22 ms] Skipping target: gen_localizations
[ +18 ms] complete
[ +20 ms] Launching lib\main.dart on SM A115M in debug mode...
[ +15 ms] C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names
--experimental-emit-debug-metadata --output-dill
C:\Users\Angel\AppData\Local\Temp\flutter_tools.b8ee7616\flutter_tool.23a43e65\app.dill --packages
C:\Users\Angel\Downloads\Codigo\Flutter\first_app\.dart_tool\package_config.json -Ddart.vm.profile=false
-Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build\cache.dill.track.dill
[ +51 ms] executing: C:\Users\Angel\AppData\Local\Android\sdk\platform-tools\adb.exe -s R9HN50CEZ7J shell -x logcat -v time -t1
[ +42 ms] BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60[ +25 ms] * Try:
[ +2 ms] 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.
[ +19 ms] * Get more help at https://help.gradle.org
[ +4 ms] BUILD FAILED in 2s
[ +362 ms] Running Gradle task 'assembleDebug'... (completed in 3.6s)
[+11837 ms] Exception: Gradle task assembleDebug failed with exit code 1
[ +3 ms] "flutter run" took 17,569ms.
[ +8 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:644:9)
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1157:12)
#3 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1009:27)
#4 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#5 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
#6 CommandRunner.runCommand (package:args/command_runner.dart:197:13)
#7 FlutterCommandRunner.runCommand.
(package:flutter_tools/src/runner/flutter_command_runner.dart:278:9)
#8 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#9 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
#10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:234:5)
#11 run.. (package:flutter_tools/runner.dart:64:9)
#12 run. (package:flutter_tools/runner.dart:62:12)
#13 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#14 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
#15 runInContext (package:flutter_tools/src/context_runner.dart:73:10)
#16 main (package:flutter_tools/executable.dart:90:3)
[ +175 ms] ensureAnalyticsSent: 163ms
[ +2 ms] Running shutdown hooks
[ +1 ms] Shutdown hook priority 4
[+3035 ms] Shutdown hooks complete
[ +4 ms] exiting with code 1
Подробнее здесь: https://stackoverflow.com/questions/668 ... sis-in-sou