lovebing / react-native-baidu-map

Baidu Map SDK modules and views for React Native(Android & iOS), support react native 0.61+. 百度地图 React Native 模块,支持 react native 0.61+,已更新到最新的百度地图SDK版本。
MIT License
856 stars 322 forks source link

我的是react-native0.59.8, #335

Closed wutiange closed 4 years ago

wutiange commented 4 years ago

按照文档里面的看了,仍然不行,

Could not invoke BaiduGeolocationModule.getCurrentPosition

null

Failed resolution of: Landroidx/core/content/ContextCompat;

Didn't find class "androidx.core.content.ContextCompat" on path: DexPathList[[zip file "/data/app/com.twwg.em-vMzg9_vU4g8Pb2n821dm8w==/base.apk"],nativeLibraryDirectories=[/data/app/com.twwg.em-vMzg9_vU4g8Pb2n821dm8w==/lib/x86, /data/app/com.twwg.em-vMzg9_vU4g8Pb2n821dm8w==/base.apk!/lib/x86, /system/lib]] invoke JavaMethodWrapper.java:383 invoke JavaModuleWrapper.java:158 run NativeRunnable.java handleCallback Handler.java:873 dispatchMessage Handler.java:99 dispatchMessage MessageQueueThreadHandler.java:29 loop Looper.java:193 run MessageQueueThreadImpl.java:232 run Thread.java:764

lovebing commented 4 years ago

如果 react-native 版本以 0.60及以下,使用 react-native-baidu-map-old。react-native 0.61 及以上版本需要启用 androidx