flutter - RoutingEngine.calculateCarRoute 返回“RoutingError.timedOut”
问题描述
我正在尝试计算两个位置之间的路线,但RoutingEngine.calculateCarRoute
总是立即返回RoutingError.timedOut
。从字面上看,没有时间休息。这是我的代码。这是我的代码还是 SDK 的问题?我正在使用 Flutter SDK 版本 4.3.1.0。
await RoutingEngine().calculateCarRoute(
[
Waypoint(
GeoCoordinates(
departure.latitude,
departure.longitude,
),
WaypointType.stopover,
500,
360,
90),
Waypoint(
GeoCoordinates(
destination.latitude,
destination.longitude,
),
WaypointType.stopover,
500,
360,
90)
],
CarOptions(
RouteOptions(
OptimizationMode.fastest, 3, routeInformation.departureTime),
RouteTextOptions(
LanguageCode.deDe, TextFormat.plain, UnitSystem.metric),
AvoidanceOptions([], [CountryCode.deu])),
(RoutingError routingError, List<Route> routeList) async {
// process result or receive error with callback
}
更新
调试应用程序时崩溃并显示以下消息:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7e9e500000
Abort message: '[FATAL] Storage.LevelDB - Cannot open database IO error: /12/LOCK @ ../../../../../external/leveldb/util/env_posix.cc:445 virtual leveldb::Status leveldb::(anonymous namespace)::PosixEnv::LockFile(const std::string &, leveldb::FileLock **): No such file or directory'
x0 0000007ead01adc8 x1 0000007ea03bdd58 x2 0000000000000001 x3 0000000000000019
x4 0000000000000188 x5 0000007e86be9732 x6 0000007f4ea2f000 x7 0000000003410486
x8 0000000000000000 x9 0000000000000000 x10 0000007e9e480050 x11 000000000007ffb0
x12 0000000000000000 x13 000000000007ffb1 x14 00399f1ee3a0f76d x15 000052f562d4cd6a
x16 0000007ea21ae398 x17 0000007f49c697b4 x18 0000000000000010 x19 0000007ea03bdd48
x20 0000007ea03bdd58 x21 0000000000000001 x22 0000007ea21b9b74 x23 000000000007ffad
x24 0000007ead01aae8 x25 0000007ead01ab18 x26 0000007e993f0e08 x27 0000000000000003
x28 0000007ea27d44cc x29 0000007ea2166558
sp 0000007ea03bdd10 lr 0000007ea1d2b14c pc 0000007ea1db321c
backtrace:
#00 pc 00000000016e121c /data/app/app-identifier-lo-9QLT1643OFdsEJYYtQg==/lib/arm64/libflutter.so (offset 0x1280000)
#01 pc 0000000001659148 /data/app/app-identifier-lo-9QLT1643OFdsEJYYtQg==/lib/arm64/libflutter.so (offset 0x1280000)
#02 pc 00000000016e75d4 /data/app/app-identifier-lo-9QLT1643OFdsEJYYtQg==/lib/arm64/libflutter.so (offset 0x1280000)
#03 pc 0000000001774f88 /data/app/app-identifier-lo-9QLT1643OFdsEJYYtQg==/lib/arm64/libflutter.so (offset 0x1280000)
#04 pc 0000000001657148 /data/app/app-identifier-lo-9QLT1643OFdsEJYYtQg==/lib/arm64/libflutter.so (offset 0x1280000)
#05 pc 00000000016623a8 /data/app/app-identifier-lo-9QLT1643OFdsEJYYtQg==/lib/arm64/libflutter.so (offset 0x1280000)
#06 pc 000000000175367c /data/app/app-identifier-lo-9QLT1643OFdsEJYYtQg==/lib/arm64/libflutter.so (offset 0x1280000)
#07 pc 0000000000001850 <anonymous:0000007e9e400000>
Lost connection to device.
因此,我认为这似乎是 SDK 的 C 代码中的一个问题。
更新 2
版本 4.3.2.0 解决了这个问题。
解决方案
推荐阅读
- batch-file - 如何检查用户在批处理文件中输入了多少输入?
- python - 如何在字符串(python)中与=一起删除单词?
- c++ - Visual Studio:从可执行文件中获取所有证书颁发者详细信息
- spring-kafka - kafka 分区何时/为什么可以“自行”取消暂停?
- javascript - 设计表单构建器的数据库和状态突变和请求,以与 graphQL、动物区系数据库、nextJS 和 Apollo 做出反应
- reactjs - 如何定义一个可以通过 Typescript 中的变量内容访问其项目的对象?
- python - 在 Colab 上使用 image_tabular(python github 包)
- java - 如何在 micronaut 2 中注入静态场?
- android - React Native Video Player Video Controls - 使用全屏按钮更改视频方向的问题
- android - Android - Google OAuth 2 - 使用不同验证码的两次响应