[英]appbundle being generated with the empty String.fromEnvironment
I'm storing some settings in String.fromEnvironment('CONFIG_EX')
, when I run the app in Debug
or Profile
mode everything works normally, but now I launched it on the PlayStore in Open Test and it's returning a 403 error and I realized that the compilation generated the empty variables.我在String.fromEnvironment('CONFIG_EX')
中存储了一些设置,当我在Debug
或Profile
模式下运行应用程序时,一切正常,但现在我在 PlayStore 的 Open Test 中启动它,它返回 403 错误,我意识到编译生成了空变量。
it's more or less like this in my run settings:在我的运行设置中它或多或少是这样的:
--dart-define=CONFIG_EX=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm generating my appbundle this way:我以这种方式生成我的 appbundle:
flutter build appbundle
Is there any way to generate this appbundle with the run settings?有没有办法用运行设置生成这个appbundle?
You can extend build commands with extra parameters.您可以使用额外参数扩展构建命令。
Android:安卓:
flutter build appbundle --dart-define=CONFIG_EX=xxx
iOS: iOS:
flutter build ios --dart-define=CONFIG_EX=xxx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.