gpt4 book ai didi

android - 当我运行 `flutter run` 时 java.lang.StackOverflowError (无错误消息)

转载 作者:行者123 更新时间:2023-12-04 10:19:13 30 4
gpt4 key购买 nike

我使用flutter run命令,但出现以下错误:

Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider
enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
java.lang.StackOverflowError (no error message)

* 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
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 1.6s
Gradle task assembleDebug failed with exit code 1

所以我使用flutter run --verbose命令

[ +374 ms] FAILURE: Build failed with an exception.
[ +1 ms] * What went wrong:
[ ] java.lang.StackOverflowError (no error message)
[ ] * 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 987ms
[ +377 ms] Running Gradle task 'assembleDebug'... (completed in 1.6s)
[ +5 ms] "flutter run" took 2,280ms.
Gradle task assembleDebug failed with exit code 1

#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 buildGradleApp (package:flutter_tools/src/android/gradle.dart:387:7)
#2 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:73:64)
#3 _rootRunUnary (dart:async/zone.dart:1134:38)
#4 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:32:15)
#10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:290:13)
#11 _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart)
#12 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:73:64)
#13 _rootRunUnary (dart:async/zone.dart:1134:38)
#14 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#15 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#16 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#17 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#18 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#19 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:554:7)
#20 _rootRun (dart:async/zone.dart:1126:13)
#21 _CustomZone.run (dart:async/zone.dart:1023:19)
#22 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#23 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#24 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#26 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#27 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)


但是flutter分析运行的结果是没有发现问题! (运行时间为 2.6 秒)出了什么问题?

最佳答案

flutter clean可以解决这个问题。

关于android - 当我运行 `flutter run` 时 java.lang.StackOverflowError (无错误消息),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60943099/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com