Flutter v1.0 踩坑记

发布时间:2019-06-03 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了Flutter v1.0 踩坑记脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

前面的安装这里就不叙述了。看这里:技术胖的Flutterhttp://jspang.com/post/flutte...

按照步骤安装后,还是一直报错,到绝望。。。

错误代码如下:

Error running Gradle:
ProcessException: Process "D:projectFlutterflutter_appandroidgradlew.bat" exited abnormally:

> Configure project :app
Checking the license for package Android SDK Platform 27 in C:UsersAdministrator.WINMICR-H4QQDHFAppDataLocalAndroidSdklicenses
Warning: License for package Android SDK Platform 27 not accepted.


FAILURE: Build failed with an exception.

* Where:
Build file 'D:projectFlutterflutter_appandroidbuild.gradle' line: 26

* 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:UsersAdministrator.WINMICR-H4QQDHFAppDataLocalAndroidSdk

* 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
  Command: D:projectFlutterflutter_appandroidgradlew.bat app:properties

Finished with error: Please review your Gradle project setup in the android/ folder.

解决办法

把项目的android/app目录下的build.gradle文件中的sdk版本号改掉,原本是27,改成28.

路径:

Flutter v1.0 踩坑记

代码如下:

Flutter v1.0 踩坑记

脚本宝典总结

以上是脚本宝典为你收集整理的Flutter v1.0 踩坑记全部内容,希望文章能够帮你解决Flutter v1.0 踩坑记所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。