Flutter дает ошибку при запуске тестового приложения - PullRequest
0 голосов
/ 31 января 2019

Было бы здорово, если бы кто-нибудь мог мне помочь.Я пытаюсь выучить это, и эти ошибки меня останавливают.

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.

1 Ответ

0 голосов
/ 31 января 2019

Как вы можете видеть в журналах, это причина - Warning: License for package Android SDK Platform 27 not accepted.

Вы можете запустить flutter doctor из терминала, и он попросит вас запустить flutter doctor --android-licenses, чтобы принять их.Исправьте любые другие проблемы, которые это может указать.После этого вам следует идти.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...