【问题标题】:My released App is not loading correctly from the first time我发布的应用程序从第一次没有正确加载
【发布时间】:2021-12-15 00:23:06
【问题描述】:

我的应用程序出现问题,在发布应用程序包并将其加载到播放商店后...我下载了自己的应用程序以检查它是否正常工作...我很惊讶应用程序没有正确加载第一次......&我必须清除停止应用程序&然后优化我的设备然后它将正确加载,我面临的情况是

虽然主屏幕应该是这样的

我更新了我的颤振,android studio,但项目结构中仍然显示一个错误,就是这个

这是我的应用程序出现这种行为的原因吗?我该如何解决这个问题......我不得不取消发布我的应用程序...... 请帮忙

【问题讨论】:

  • 你试过dart pub cache repair吗?
  • 其实没有...我现在就试试
  • 运行 dart pub 缓存修复后,出现两个错误 Library KotlinJavaRuntime is not used [Fix]

标签: android flutter google-play release


【解决方案1】:

主要问题是我使用sizer2.0.15 包为主屏幕制作响应卡,并且我在主页中使用const 修饰符作为以下代码

return Sizer(
  builder: (context, orientation, deviceType) {
    return const MaterialApp(
      home: MainScreenPage(),
    );
  },
);

我做了一个非常愚蠢的实验并且成功了,我从 main.dart 中的 MaterialApp 中删除了 const 修饰符,然后它开始在发布版本上正常工作......在编码期间如果 const 修饰符是添加到 Container,sizedBox,Font,..ets 它将显示一个错误,因为这个问题只发生在主屏幕加载中......我删除了constmodifier & 我得到了我想要的结果.. .

 return Sizer(
  builder: (context, orientation, deviceType) {
    return MaterialApp(
      home: MainScreenPage(),
    );
  },
);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-03
    • 2016-06-27
    • 1970-01-01
    • 2020-09-30
    • 1970-01-01
    相关资源
    最近更新 更多