qiuxiang / react-native-amap3d

react-native 高德地图组件,使用最新 3D SDK,支持 Android + iOS
https://qiuxiang.github.io/react-native-amap3d/api/
MIT License
1.28k stars 331 forks source link

安卓配置了,但是地图不显示 #185

Closed DisturbJY closed 6 years ago

DisturbJY commented 6 years ago

安卓手机,ios还没配置 版本:"react-native": "0.44.3", 望能指教

qiuxiang commented 6 years ago

你怎么调用的?

DisturbJY commented 6 years ago

我想刚才编辑代码没显示出来,我现在想上传图片

qiuxiang commented 6 years ago

然后?

DisturbJY commented 6 years ago
qq20180129-140642 2x
qiuxiang commented 6 years ago

看看现在的截图

DisturbJY commented 6 years ago

你好,截图已上,现在我该怎么做呢,有没有好的思路,麻烦你了

qiuxiang commented 6 years ago

截图在哪?

DisturbJY commented 6 years ago

我已经上传了,不是这个吗?? https://user-images.githubusercontent.com/20720036/35495841-f31988d8-04fd-11e8-9638-6aa8f9cc2bd8.png

qiuxiang commented 6 years ago

我是说在手机上的截图

DisturbJY commented 6 years ago

wechatimg6

DisturbJY commented 6 years ago

1、$ npm i react-native-amap3d 2、$ react-native link react-native-amap3d 3、添加高德 Key Android 获取高德 Key。

编辑 Android 项目的 AndroidManifest.xml(一般在 android\app\src\main\AndroidManifest.xml),添加如下代码:

4、导入地图模块

我做安卓的配置就是以上的那些步骤,是不是还有其他漏了??

qiuxiang commented 6 years ago

你这根本就没编译

DisturbJY commented 6 years ago

编译??你好,我生成的是debug apk,还要弄什么吗

qiuxiang commented 6 years ago

就是 link 之后重新编译生成 apk

DisturbJY commented 6 years ago

谢谢作者的热心回复 我这边的run-android的错误是:

node_modules/react-native-amap3d/android/src/main/java/cn/qiuxiang/react/amap3d/AMap3DPackage.kt: (12, 1): Class 'AMap3DPackage' is not abstract and does not implement abstract member public abstract fun createJSModules(): (Mutable)List<Class<out JavaScriptModule!>!>! defined in com.facebook.react.ReactPackage :react-native-amap3d:compileReleaseKotlin FAILED

FAILURE: Build failed with an exception.

qiuxiang commented 6 years ago

只支持 RN >= 0.47,其实也可以运行,只是要自己改,更多信息自己找已经关闭的 issue。