繁体   English   中英

Flutter在运行测试应用程序时出现错误

[英]Flutter Giving error in running the test app

如果有人可以帮助我,那就太好了。 我正在尝试学习它,而这些错误使我停下来。

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.

如您在日志中看到的,这是原因- Warning: License for package Android SDK Platform 27 not accepted.

您可以从终端运行flutter doctor ,它会要求您运行flutter doctor --android-licenses以接受它们。 解决它可能指示的任何其他问题。 之后,您应该会很好。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM