如何解决在Redmi A1+上运行我的Flutter应用程序的问题?

huangapple go评论65阅读模式
英文:

How to fix problem with running my Flutter app on Redmi A1+?

问题

无法在小米Redmi A1+上运行应用程序。只显示白屏。在所有其他智能手机上都正常工作!

在调试模式下,出现以下错误:

Launching lib\main.dart on 220733SFG in debug mode...
Running Gradle task 'assembleDebug'...
  Built build\app\outputs\flutter-apk\app-debug.apk.
D/FlutterGeolocator( 7170): Attaching Geolocator to activity
D/FlutterGeolocator( 7170): Creating service.
D/FlutterGeolocator( 7170): Binding to location service.
D/FlutterGeolocator( 7170): Geolocator foreground service connected
D/FlutterGeolocator( 7170): Initializing Geolocator services
D/FlutterGeolocator( 7170): Flutter engine connected. Connected engine count 1
Debug service listening on ws://127.0.0.1:53125/PnLEctRPbCw=/ws
Syncing files to device 220733SFG...
W/isarworker( 7170): type=1400 audit(0.0:1125): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1126): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1127): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1128): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1129): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1130): avc: denied { getattr } for path="/metadata" dev="mmcblk0p13" ino=2 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:metadata_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1131): avc: denied { getattr } for path="/linkerconfig" dev="tmpfs" ino=9277 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:linkerconfig_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
E/flutter ( 7170): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: IsarError: Cannot open Environment: MdbxError (12): Out of memory
E/flutter ( 7170): 
D/ProfileInstaller( 7170): Installing profile for ru.ivjh.esc.esc_driver

更新

我发现问题出在flutter_map_tile_caching包(https://pub.dev/packages/flutter_map_tile_caching)上。

当我调用

await FMTC.instance('mapStore').manage.createAsync();

我收到这个错误。

英文:

Can't run app on Xiaomi Redmi A1+. Just white sceen. On all other smarthones work ok!

In debug mode next error:

Launching lib\main.dart on 220733SFG in debug mode...
Running Gradle task 'assembleDebug'...
√  Built build\app\outputs\flutter-apk\app-debug.apk.
D/FlutterGeolocator( 7170): Attaching Geolocator to activity
D/FlutterGeolocator( 7170): Creating service.
D/FlutterGeolocator( 7170): Binding to location service.
D/FlutterGeolocator( 7170): Geolocator foreground service connected
D/FlutterGeolocator( 7170): Initializing Geolocator services
D/FlutterGeolocator( 7170): Flutter engine connected. Connected engine count 1
Debug service listening on ws://127.0.0.1:53125/PnLEctRPbCw=/ws
Syncing files to device 220733SFG...
W/isarworker( 7170): type=1400 audit(0.0:1125): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1126): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1127): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1128): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1129): avc: denied { search } for name="vendor" dev="tmpfs" ino=7352 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1130): avc: denied { getattr } for path="/metadata" dev="mmcblk0p13" ino=2 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:metadata_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
W/isarworker( 7170): type=1400 audit(0.0:1131): avc: denied { getattr } for path="/linkerconfig" dev="tmpfs" ino=9277 scontext=u:r:untrusted_app:s0:c177,c256,c512,c768 tcontext=u:object_r:linkerconfig_file:s0 tclass=dir permissive=0 app=ru.ivjh.esc.esc_driver
E/flutter ( 7170): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: IsarError: Cannot open Environment: MdbxError (12): Out of memory
E/flutter ( 7170): 
D/ProfileInstaller( 7170): Installing profile for ru.ivjh.esc.esc_driver

UPDATE:

I found that the problem is with the package flutter_map_tile_caching (https://pub.dev/packages/flutter_map_tile_caching).

When I call

await FMTC.instance('mapStore').manage.createAsync();

I get this error.

答案1

得分: 1

我两天前遇到了与你相同的问题。当我深入研究依赖关系时,我发现Flutter已经添加了Prerelease版本9.0.0-dev.2的FMTC,而我正在使用flutter_map 5.0.0。

如果这也是你的情况,要么降级到Flutter_map 4并使用FMTC 8,要么等待FMTC来处理flutter_map 5(或者如果你找到了问题,可以在GitHub上向他们提出一个PR;-))

英文:

I faced the same issue as you 2 days ago. As I dug into the dependencies, I found out that Flutter added the Prerelease version 9.0.0-dev.2 of FMTC since I was using flutter_map 5.0.0.

If it is your case, either step down to Flutter_map 4 and use FMTC 8, either wait for FMTC to handle flutter_map 5 (or propose them a PR on github if you find out the problem 如何解决在Redmi A1+上运行我的Flutter应用程序的问题? )

huangapple
  • 本文由 发表于 2023年6月13日 18:51:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76464146.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定