Open nawnoes opened 5 years ago
the same error , any solution?
sorry, I'm foreigner. So I can't regist baidu developer. Our team decieded that our app don't use baidu-map.
I think you need expo eject or creat react-native app.
Im sorry not to help you. have a good day
2019년 6월 11일 (화) 오후 2:18, 秦帅 notifications@github.com님이 작성:
the same error , any solution?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lovebing/react-native-baidu-map/issues/252?email_source=notifications&email_token=AHUMRVMNZGJ5FF3OC3ZSNP3PZ4YTNA5CNFSM4HOKODN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXL63VI#issuecomment-500690389, or mute the thread https://github.com/notifications/unsubscribe-auth/AHUMRVP7GN3DFHJBUKHCEALPZ4YTNANCNFSM4HOKODNQ .
@nawnoes thank you anyway,totally in a mess today :(
同问这个bug咋解决(感激不尽
同问
解决方法:在 BaiduMapPackage.java
文件中把
@MainThread
protected void init(ReactApplicationContext reactContext) {
Looper.prepare();
SDKInitializer.initialize(reactContext.getApplicationContext());
}
修改成
@MainThread
protected void init(ReactApplicationContext reactContext) {
if (Looper.myLooper() == null) {
Looper.prepare();
}
SDKInitializer.initialize(reactContext.getApplicationContext());
}
加一行判断就行了@guohuihot
BaiduMapPackage.java 文件在哪
@Gusabary 这个 BaiduMapPackage.java 文件在哪里?
@Gusabary 这个 BaiduMapPackage.java 文件在哪里?
\node_modules\react-native-baidu-map\android\src\main\java\org\lovebing\reactnative\baidumap
新下载的react-native-baidu-map:1.0.37 已经有这行判断了,还是出现Invariant Violation: requireNativeComponent: "BaiduMapOverlayInfoWindow" was not found in the UIManager.
新下载的react-native-baidu-map:1.0.37 已经有这行判断了,还是出现Invariant Violation: requireNativeComponent: "BaiduMapOverlayInfoWindow" was not found in the UIManager.
我也出现这个问题了,请问你解决了吗
hello everyone. I just want to use 'react-native-baidu-map' in react-native with expo. I installed this module using 'yarn add react-native-baidu-map'. and I added this code in my program.
So, please help me this issue.
thanks, have a good day
/**
import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View, Dimensions, Button} from 'react-native'; import { MapView, MapTypes, Geolocation, Overlay } from 'react-native-baidu-map'; const {height, width} = Dimensions.get('window');
type Props = {}; export default class App extends Component {
state = {
};
render() { const { infoWindowProps } = this.state; console.warn('Overlay', Overlay) return (
} }
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', } });