flutter - Flutter 应用程序在第二次打开时在调试时突然关闭
问题描述
我有一个大问题,应用程序在第二次打开后突然关闭。
这是上下文和日志:
当你打开应用程序时,我和我的朋友正在制作一个带有位置服务的颤振应用程序。
一切都按预期工作,然后我们离开应用程序 1 个月以在应用程序的网站上工作,然后我们尝试再次运行最后一个构建,这就是发生的事情(日志在这里):
/NetworkRequest( 5689): No App Check token for request.
D/skia ( 5689): 1 Shader compilation error
D/skia ( 5689): 2 ------------------------
D/skia ( 5689): 3 Errors:
D/skia ( 5689): 4
D/EGL_emulation( 5689): eglMakeCurrent: 0xd521a300: ver 3 0 (tinfo 0xd52d4490)
E/libEGL ( 5689): call to OpenGL ES API with no current context (logged once per thread)
D/FlutterLocationService( 5689): Unbinding from location service.
D/FlutterLocationService( 5689): Destroying service.
W/FlutterJNI( 5689): Tried to send a platform message response, but FlutterJNI was detached from native C++. Could not send. Response ID: 21
我尝试了多种方法,例如:
- 颤振酒吧升级
- 升级颤振
- 更新 Gradle
- 更新 java JDE 和 JDK
需要考虑的一件事:
这只发生在android上,当我第二次打开应用程序时,如果我在android上删除应用程序的缓存和存储文件,应用程序会要求再次使用GPS并正常工作,但是在你第二次打开它之后时间再次发生。
感谢任何可以提供帮助的人。
颤振医生:
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Versión 10.0.19042.1110], locale es-CL)
• Flutter version 2.2.3 at C:\flutter
• Framework revision f4abaa0735 (2 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\nico\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
[√] VS Code (version 1.58.2)
• VS Code at C:\Users\nico\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.24.0
[√] Connected device (3 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.124
• Edge (web) • edge • web-javascript • Microsoft Edge 91.0.864.67
解决方案
推荐阅读
- java - IntelliJ Java 配置
- r - foreach 实现崩溃并在 R 中生成错误
- python - 删除所有布尔列都为 False 的行 - Python
- python - np.argamx 不返回整数
- powershell - 使用 PowerShell 从网页按钮单击下载文件
- python - 如何将元组保存到python中的excel
- python - 如何修复 Django 和 Postgres SQL 中布尔类型的无效输入语法:“abc”?
- reactjs - 此表达式不可调用。类型“{}”没有调用签名。TS2349
- api - 如何配置 Krakend 使其按原样返回 http 重定向响应而不是遵循 http 重定向?
- node.js - React 服务器(前端)正在阻塞 express 服务器(后端)