react-native-amap3d icon indicating copy to clipboard operation
react-native-amap3d copied to clipboard

TypeError: null is not an object (evaluating 'AMapSdk.initSDK')

Open xiaozhangtongx opened this issue 3 years ago • 3 comments

expo 运行android报TypeError: null is not an object (evaluating 'AMapSdk.initSDK'),依赖版本如下:

"react-native": "0.70.5",
"react-native-amap3d": "3.0.7",

求解决方案

xiaozhangtongx avatar Mar 15 '23 01:03 xiaozhangtongx

安卓下不要把AMapSdk.init的逻辑放在组件外执行,放在组件内执行就可以了,比如在useEffect里执行AMapSdk.init({xxx})的逻辑就可以 "react-native": "0.64.3", "react-native-amap3d": "3.1.1",

captain-c avatar Mar 23 '23 03:03 captain-c

"react-native": "0.63.5",
"react-native-amap3d": "^3.2.3",

+1

inkcrazy666 avatar Apr 21 '23 05:04 inkcrazy666

"react-native": "0.72.3",
"react-native-amap3d": "^3.2.4",

在iOS环境下, 依然出现这个问题, 有没有解决办法?

xuchen81 avatar Aug 22 '23 05:08 xuchen81