当前位置: 首页 > 知识库问答 >
问题:

生成失败,出现异常。有颤振的梯度问题

宦文柏
2023-03-14

我试图为我的应用程序构建gradle,但构建失败了

我试图改变gradle版本号和gradle插件版本号,但每次我都得到愚蠢的错误,我不知道为什么!我试着根据这份文件改变了

gradle 5.6.4>>>gradle插件3.6.0版

gradle 5.6.4>>>gradle插件3.4.0版

gradle 5.6.2>>>gradle插件3.6.0版

* What went wrong:
A problem occurred evaluating project ':app'.
> com/google/common/util/concurrent/SettableFuture
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

classpath 'com.android.tools.build:gradle:3.6.3'

谢谢

这是颤振运行-V的结果

[  +31 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +79 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +1 ms] f7a6a7906be96d2288f5d63a5a54c515a6e987fe
[   +1 ms] executing: [C:\src\flutter/] git tag --contains HEAD
[ +410 ms] Exit code 0 from: git tag --contains HEAD
[   +2 ms] 1.17.1
[  +13 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +34 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [C:\src\flutter/] git ls-remote --get-url origin
[  +28 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[ +180 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD
[  +98 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +77 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] 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.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +63 ms] executing: C:\android\src\platform-tools\adb.exe devices -l
[  +69 ms] List of devices attached
           127.0.0.1:62001        device product:dream2ltexx model:SM_G930K device:shamu transport_id:1
[  +16 ms] C:\android\src\platform-tools\adb.exe -s 127.0.0.1:62001 shell getprop
[  +71 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[  +10 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.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +424 ms] Generating
C:\Users\Milad\AndroidStudioProjects\flutter_app123\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +81 ms] ro.hardware = samsungexynos9810
[ +100 ms] Launching lib\main.dart on SM G930K in debug mode...
[  +16 ms] C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe
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
-Ddart.developer.causal_async_stacks=true --output-dill
C:\Users\Milad\AppData\Local\Temp\flutter_tool.dea96117-9a58-11ea-b26c-003018a2b692\app.dill --packages
C:\Users\Milad\AndroidStudioProjects\flutter_app123\.packages -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-

call-instructions --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build\cache.dill
[  +36 ms] executing: C:\android\src\platform-tools\adb.exe -s 127.0.0.1:62001 shell -x logcat -v time -t 1
[  +80 ms] Exit code 0 from: C:\android\src\platform-tools\adb.exe -s 127.0.0.1:62001 shell -x logcat -v time -t 1
[   +1 ms] --------- beginning of main
           05-20 09:45:19.493 I/LockboxService( 2694): Completed task: true
[  +19 ms] <- compile package:flutterapp123/main.dart
[  +11 ms] executing: C:\android\src\platform-tools\adb.exe version
[  +43 ms] Android Debug Bridge version 1.0.41
           Version 30.0.1-6435776
           Installed as C:\android\src\platform-tools\adb.exe
[  +11 ms] executing: C:\android\src\platform-tools\adb.exe start-server
[  +39 ms] Building APK
[  +34 ms] Running Gradle task 'assembleDebug'...
[   +5 ms] gradle.properties already sets `android.enableR8`
[  +33 ms] Using gradle from C:\Users\Milad\AndroidStudioProjects\flutter_app123\android\gradlew.bat.
[   +2 ms] C:\Users\Milad\AndroidStudioProjects\flutter_app123\android\gradlew.bat mode: 33279 rwxrwxrwx.
[  +47 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +827 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[   +1 ms] openjdk version "1.8.0_212-release"
           OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
           OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
[   +6 ms] executing: [C:\Users\Milad\AndroidStudioProjects\flutter_app123\android/]
C:\Users\Milad\AndroidStudioProjects\flutter_app123\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-x86
-Ptarget=C:\Users\Milad\AndroidStudioProjects\flutter_app123\lib\main.dart -Ptrack-widget-creation=true
-Pfilesystem-scheme=org-dartlang-root assembleDebug
[+1433 ms] Welcome to Gradle 5.6.4!
[   +2 ms] Here are the highlights of this release:
[        ]  - Incremental Groovy compilation
[        ]  - Groovy compile avoidance
[        ]  - Test fixtures for Java projects
[   +1 ms]  - Manage plugin versions via settings script
[   +1 ms] For more details see https://docs.gradle.org/5.6.4/release-notes.html
[+2954 ms] FAILURE: Build failed with an exception.
[  +97 ms] * Where:
[        ] Build file 'C:\Users\Milad\AndroidStudioProjects\flutter_app123\android\app\build.gradle' line: 24
[   +1 ms] * What went wrong:
[   +1 ms] A problem occurred evaluating project ':app'.
[   +2 ms] > com/google/common/util/concurrent/SettableFuture
[  +16 ms] * Try:
[   +1 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.
[   +2 ms] * Get more help at https://help.gradle.org
[   +1 ms] BUILD FAILED in 3s
[ +949 ms] Running Gradle task 'assembleDebug'... (completed in 6.4s)
[+8351 ms] Exception: Gradle task assembleDebug failed with exit code 1
[   +5 ms] "flutter run" took 16,098ms.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:569:7)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:723:18)
#3      _rootRunUnary (dart:async/zone.dart:1192:38)
#4      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#5      _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#6      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#7      Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#8      Future._completeWithValue (dart:async/future_impl.dart:526:5)
#9      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#10     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#11     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#12     _rootRunUnary (dart:async/zone.dart:1192:38)
#13     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#14     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#15     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#16     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#17     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#18     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#19     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#20     AndroidDevice.isLocalEmulator (package:flutter_tools/src/android/android_device.dart)
#21     _rootRunUnary (dart:async/zone.dart:1192:38)
#22     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#23     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#24     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#25     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#26     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#27     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
#28     _rootRun (dart:async/zone.dart:1184:13)
#29     _CustomZone.run (dart:async/zone.dart:1077:19)
#30     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#31     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
#32     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#33     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#34     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#35     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

共有1个答案

宦兴朝
2023-03-14

我清除了C:\users\{您的用户名}\.gradle\caches中的缓存,构建成功。

 类似资料:
  • 当我启动我的应用程序时,我收到了这个错误消息。自从上次跑步以来,我没有做任何改变,当时一切都很好。有人知道怎么解决这个问题吗?非常感谢。 错误:无法确定任务“:app:processDebugResources”的依赖项 无法解析配置“:app:debugRuntimeClasspath”的所有任务依赖项。无法解析io。grpc:grpc核心:[1.28.0]。所需人员:项目:应用程序 > 尝试:

  • 我正在尝试创建我的第一个颤振应用程序,但当我运行它时,它会给我这个错误 失败:生成失败,出现异常。 > 无法打开设置文件'C:\JavaDemos\sea_ok\android\settings.gradle'的设置通用类缓存(C:\用户\Emre.gradle\缓存\5.6.2\脚本\b4ieilm7vkknhwvoai8y4gzba\设置\settins8410a2d21ed2f87c8a03

  • 失败:生成失败,出现异常。 > 其中:脚本'C:\src\flutter\包\flutter_tools\gradle\flutter.gradle'行:904 出错的地方:任务': app: compileFlutterBuildDebug'执行失败。 进程'命令'C:\src\flutter\bin\flutter.bat"以非零退出值1结束 我尝试了flutter-clean/pug-get

  • 当我运行时,我的构建失败了,我收到了以下消息: 失败:生成失败,出现异常。 > 错误:配置根项目“RxRedux”时出现问题。 无法解析配置“:classpath”的所有文件。找不到com。Android工具。构建:gradle:3.0。1.在以下位置搜索:https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle

  • AGPBI:{“kind”:“error”,“text”:“Android资源链接失败”,“sources”:[{}],“original”:“error::AAPT:D:\Android basics kotlin cupcake app starter\app\build\intermediates\processed\u res\debug\out\resources-debug.ap\:错

  • 当我尝试时,我出现了以下错误…有人能帮忙吗? 失败:生成失败,出现异常。 null 请访问https://help.gradle.org获取更多帮助 生成在12s运行分级任务“汇编发布”时失败...正在运行分级任务“汇编发布”...已完成13.3s分级任务AssemblereRease失败,退出代码为%1