Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

项目迭代, 请教Android 气泡onPress问题 #32

Open
leo403771872 opened this issue Jun 15, 2017 · 0 comments
Open

项目迭代, 请教Android 气泡onPress问题 #32

leo403771872 opened this issue Jun 15, 2017 · 0 comments

Comments

@leo403771872
Copy link

亲, iOS部分我已经修改完毕, 但是Android原生部分我没有发现onPress等相关回调.
我参照
@ReactProp(name = "annotations")
public void setAnnotations(MapView mapView, @nullable ReadableArray value) throws Exception{}

写了一个
@ReactProp(name = "onPress")
public void setOnPress(MapView mapView, Callback annotationCallback) throws Exception {}
收到爆红如下
Exception in native call from JS
java.lang.RuntimeException: Unrecognized type: interface com.facebook.react.bridge.Callback for method: com.yiyang.reactnativebaidumap.BaiduMapViewManager#setOnPress

修改成
@ReactProp(name = "onPress")
public void setOnPress(MapView mapView, @nullable ReadableArray value) throws Exception {}
仍然收到如下爆红
Exception in native call from JS com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'onPress' of a view managed by: RCTBaiduMap

公司项目急需实现这个Android点击气泡回调功能, 我对Android不熟悉, 能否提供一下可行的代码, 或者指导一下思路

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant