Mapbox:我想使用 Locationengine 来获取用户的当前位置,但它给我一个错误
Mapbox: I want to use the Locationengine to get the current location of the user but it gets me an error
我收到以下错误:
Error:(81, 39) error: cannot access LostApiClient
class file for com.mapzen.android.lost.api.LostApiClient not found
Error:(82, 39) error: cannot access LocationListener
class file for com.mapzen.android.lost.api.LocationListener not found
我能做什么?我尝试了在 www 上找到的所有内容,但没有任何效果。
找到这个错误的原因:我没有添加Mapbox services sdk和Mapbox telemetry sdk的依赖。
如果您遇到此问题,只需将这些行添加到 build.gradle 文件中:
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:3.0.1'
implementation 'com.mapbox.mapboxsdk:mapbox-android-telemetry:2.2.10@aar'
我收到以下错误:
Error:(81, 39) error: cannot access LostApiClient class file for com.mapzen.android.lost.api.LostApiClient not found
Error:(82, 39) error: cannot access LocationListener class file for com.mapzen.android.lost.api.LocationListener not found
我能做什么?我尝试了在 www 上找到的所有内容,但没有任何效果。
找到这个错误的原因:我没有添加Mapbox services sdk和Mapbox telemetry sdk的依赖。
如果您遇到此问题,只需将这些行添加到 build.gradle 文件中:
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:3.0.1'
implementation 'com.mapbox.mapboxsdk:mapbox-android-telemetry:2.2.10@aar'