【发布时间】:2020-05-08 10:00:48
【问题描述】:
我是颤振的初学者。在编写完代码后,我想模拟 Android 模拟器的代码。几天前我可以成功运行,但今天我不能。错误代码显示无法找到包 java.lang。我没有找到我应该在哪里寻找问题。 SDK路径正确,flutter Doctor没发现问题。我也可以使用 iOS 模拟器运行项目。我正在使用 MacOS。这里有完整的错误信息。
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':location:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 7s
Gradle task assembleDebug failed with exit code 1
【问题讨论】:
-
尝试使用flutter clean命令,然后使用flutter run再次运行
-
我会试试@AR,谢谢。
标签: android flutter android-emulator