我试图弄明白,但我甚至找不到方法。请帮帮我。
当我尝试运行我的第一个颤振应用程序时,会发生以下情况:
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
我已经用物理设备和模拟器进行了尝试。我试着用“颤振清洁”。振作起来,医生,说一切都好。
如果有帮助的话,下面是运行“颤振跑-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] <- compile package:first_app/main.dart
[ +216 ms] --------- beginning of main
03-31 11:34:37.956 W/fb4a.ReqContexts(10384): continueFromDirect() replaced by create()
[ +21 ms] executing: C:\Users\Angel\AppData\Local\Android\sdk\platform-tools\adb.exe version
[ +154 ms] Android Debug Bridge version 1.0.41
Version 31.0.1-7187441
Installed as C:\Users\Angel\AppData\Local\Android\sdk\platform-tools\adb.exe
[ +53 ms] executing: C:\Users\Angel\AppData\Local\Android\sdk\platform-tools\adb.exe start-server
[ +135 ms] Building APK
[ +56 ms] Running Gradle task 'assembleDebug'...
[ +15 ms] Using gradle from C:\Users\Angel\Downloads\Codigo\Flutter\first_app\android\gradlew.bat.
[ +40 ms] C:\Users\Angel\Downloads\Codigo\Flutter\first_app\android\gradlew.bat mode: 33279 rwxrwxrwx.
[ +25 ms] executing: [C:\Users\Angel\Downloads\Codigo\Flutter\first_app\android/]
C:\Users\Angel\Downloads\Codigo\Flutter\first_app\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-arm
-Ptarget=C:\Users\Angel\Downloads\Codigo\Flutter\first_app\lib\main.dart -Ptrack-widget-creation=true
-Pfilesystem-scheme=org-dartlang-root assembleDebug
[+2941 ms] FAILURE: Build failed with an exception.
[ +137 ms] * What went wrong:
[ +14 ms] 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).
[ +11 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)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1157:12)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1009:27)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#5 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#6 CommandRunner.runCommand (package:args/command_runner.dart:197:13)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:278:9)
<asynchronous suspension>
#8 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#9 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:234:5)
<asynchronous suspension>
#11 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)
<asynchronous suspension>
#12 run.<anonymous closure> (package:flutter_tools/runner.dart:62:12)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#15 runInContext (package:flutter_tools/src/context_runner.dart:73:10)
<asynchronous suspension>
#16 main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>
[ +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
求你了,我真的需要帮助。
我也有同样的问题。。
运行未来医生
并确保您安装了适合我的android Studio。
我也面临这个问题,但不是降级JDK版本,而是更新distributionUrl和build tools版本,它对我有用
看到你的评论,我有个问题要问。我的JDK版本16降到了11,它正常工作了。
请帮我解决这个问题。我试图在我的真实设备上运行我的第一个项目,但我得到了这个错误:失败:构建失败,出现异常。 < li >哪里出错:无法打开设置文件“C:\ Users \ Admin \ AndroidStudioProjects \ flutter _ first app \ Android \ settings . gradle”(C:\ Users \ Admin . gradle \ c
问题内容: 我正在尝试使用 gradle* 创建一个新的 Java 9 项目,但是在项目创建之后,我立即收到了来自gradle的错误消息: * Java版本:9(内部版本9 + 178) Gradle版本:4.1-rc-2 根据该文章这些Java / gradle这个版本应该是兼容的。 我怎么解决这个问题? 任何帮助表示高度赞赏。 问题答案: 我已通过将Gradle JVM降级到8解决了该问题。这
经过多次搜索并试图解决这个问题,最终我不能,当我试图在真正的手机上运行应用程序时,我得到这个错误: 失败:构建失败,但有例外。 出了什么问题:无法打开设置文件“C:\项目\扑腾\埃尔穆斯塔法\android\settings.gradle”的设置通用类缓存(C:\用户\Mahdi MyName.gradle\caches\6.5\scripts\bq3hllkgb26p0nrblf5gh8d37\
我试图使用gradle创建一个新的Java9项目,但就在项目创建后,我收到了gradle的错误: Java版本:9(构建9+178) Gradle版本:4.1-RC-2 根据本文,那些Java/Gradle版本应该是兼容的。 我如何解决这个问题? 非常感谢任何帮助。
我正在尝试编译下面的代码Gralde 4.9、Groovy-2.5.2和JDK11,它给出了这个错误,相同的代码在JDK 8中编译。 错误消息 我在这里有github项目:https://github.com/sfgroups/FileUpload
我正在尝试为桌面游戏设置libgdx,当我尝试生成项目时,出现了此错误,构建失败。我有最新版本的Java(13.0.2)和Gradle(6.6),它们都设置为路径中的环境变量。谁能帮帮我吗? 错误如下所示: