flutter运行错误

运行flutter报错:

FAILURE: Build failed with an exception.

* Where:
Build file 'mydir/android/app/build.gradle' line: 16

* What went wrong:
A problem occurred evaluating project ':app'.
versionCode not found. Define flutter.versionCode in the local.properties file.

解决方法:

在Android文件夹下的local.properties文件中添加:

flutter.versionName=1.0.0
flutter.versionCode=1
flutter.buildMode=debug

你可能感兴趣的:(flutter运行错误)