小编wag*_*ima的帖子

Flutter 地理定位器包无法检索位置

我在地理定位器存储库上提出了一个问题https://github.com/BaseflowIT/flutter-geolocator/issues/199

\n\n

它需要地理定位器包无法检索位置。他们最近发布了新版本 3.0.0,在那之后我只遇到了后果。

\n\n

我正在使用正确的依赖项:

\n\n
dependencies:\n geolocator: \'^3.0.0\'\n\ntargetSdkVersion 28 and compileSdkVersion 28\n
Run Code Online (Sandbox Code Playgroud)\n\n

Flutter 医生给了我这个:

\n\n
[\xe2\x9c\x93] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.3 18D109, locale en-US)\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK 28.0.3)\n[\xe2\x9c\x93] iOS toolchain - develop for iOS devices (Xcode 10.1)\n[\xe2\x9c\x93] Android Studio (version 3.2)\n[\xe2\x9c\x93] IntelliJ IDEA Community Edition (version 2018.2.5)\n[\xe2\x9c\x93] Connected device (1 available)\n\n\xe2\x80\xa2 No issues found!\n
Run Code Online (Sandbox Code Playgroud)\n\n

一旦我调用await Geolocator().getCurrentPosition(desiredAccuracy: LocationAccuracy.high);代码,就不会返回任何内容,并且我在终端中有以下输出:

\n\n
\n

I/DynamiteModule( 4233): 考虑本地模块\n com.google.android.gms.maps_dynamite:0 …

google-maps geolocation google-maps-api-3 flutter

5
推荐指数
1
解决办法
2万
查看次数