gpt4 book ai didi

android - Flutter 在运行测试应用程序时出错

转载 作者:IT王子 更新时间:2023-10-29 07:12:36 24 4
gpt4 key购买 nike

如果有人能帮助我,那就太好了。我正在努力学习它,但这些错误阻碍了我。

Error running Gradle:
ProcessException: Process "C:\Users\HP\AndroidStudioProjects\flutternew\android\gradlew.bat" exited abnormally:
Configure project :app
Checking the license for package Android SDK Platform 27 in C:\Users\HP\AppData\Local\Android\sdk\licenses
Warning: License for package Android SDK Platform 27 not accepted.
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\HP\AndroidStudioProjects\flutternew\android\build.gradle' line: 24
What went wrong:
A problem occurred evaluating root project 'android'.
A problem occurred configuring project ':app'.
Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-27 Android SDK Platform 27
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: C:\Users\HP\AppData\Local\Android\sdk
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 7m 38s
Command: C:\Users\HP\AndroidStudioProjects\flutternew\android\gradlew.bat app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.

最佳答案

正如您在日志中看到的,这就是原因 - 警告:不接受 Android SDK 平台 27 包的许可证。

您可以从终端运行 flutter doctor,它会要求您运行 flutter doctor --android-licenses 以接受它们。修复它可能指示的任何其他问题。之后,您就可以开始了。

关于android - Flutter 在运行测试应用程序时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54456393/

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