简体   繁体   English

为什么 flutter 命令“flutter run --release”不起作用?

[英]Why is the flutter command, “flutter run --release” not working?

I have built an application using sharedpreferences so i could track who is logged in and logged out the app, but some reason, when i run the command "flutter run --release" it is giving off this error, I know one of them is referring directly to how I am using SharedPreferences, but I don't know how to fix it.我已经使用 sharedpreferences 构建了一个应用程序,因此我可以跟踪谁登录和注销了该应用程序,但是出于某种原因,当我运行命令“flutter run --release”时,它会发出此错误,我知道其中一个是直接指的是我如何使用 SharedPreferences,但我不知道如何修复它。 Could some please help me?有人可以帮我吗?

Image of the error being displayed in my console.我的控制台中显示的错误图像。

Did you try this?你试过这个吗?

flutter clean

then try this your command.然后试试这个你的命令。 If the problem isn't solved let me know如果问题没有解决,请告诉我

First run android folder in your project with android studio and sync it.首先使用 android 工作室在您的项目中运行 android 文件夹并同步它。

And try to change the compileSdkVersion to: compileSdkVersion 28 or upper并尝试将 compileSdkVersion 更改为: compileSdkVersion 28或更高版本

And to get more information you can see this posts: this a,d this要获取更多信息,您可以查看以下帖子: this a,d this

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

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