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

iOS真机上报"AMapView" was not found in the UlManager和null is not an object (evaluating 'AMapSdk.initSDK')错误 #775

Closed
wubaibin opened this issue Nov 29, 2022 · 18 comments

Comments

@wubaibin
Copy link

RN版本0.68.2 amap 3.1.2
WechatIMG129
WechatIMG128

@wubaibin
Copy link
Author

@qiuxiang 大佬知道这个问题如何解决吗

@wubaibin
Copy link
Author

@sunnylqm @xhuang3 @summer88123 请问这个如何解决

@sunnylqm
Copy link
Contributor

我好像回答过你一模一样的问题? reactnativecn/react-native-website#618

@wubaibin
Copy link
Author

我好像回答过你一模一样的问题? reactnativecn/react-native-website#618
我都步骤就是先在ios下pod install 然后才yarn ios的

@sunnylqm
Copy link
Contributor

检查podfile.lock中有amap吗

@wubaibin
Copy link
Author

wubaibin commented Nov 29, 2022

检查podfile.lock中有amap吗

没有,但是我确实是先pod install 再yarn ios的。请问有什么解决办法吗

@sunnylqm
Copy link
Contributor

贴下package.json

@wubaibin
Copy link
Author

wubaibin commented Nov 29, 2022

贴下package.json

{ "name": "TripApp", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "@react-native-async-storage/async-storage": "^1.17.7", "@react-navigation/bottom-tabs": "^6.3.2", "@react-navigation/native": "^6.0.11", "@react-navigation/native-stack": "^6.7.0", "react": "17.0.2", "react-native": "0.68.2", "react-native-amap-geolocation": "^1.2.0", "react-native-amap3d": "^3.1.3", "react-native-camera": "^4.2.1", "react-native-event-bus": "^1.0.0", "react-native-gesture-handler": "^2.5.0", "react-native-image-picker": "^4.8.4", "react-native-linear-gradient": "^2.6.2", "react-native-safe-area-context": "^4.3.1", "react-native-screens": "^3.15.0", "react-native-swiper": "^1.6.0", "react-native-webview": "^11.23.0", "react-native-wechat-lib": "^1.1.26", "react-redux": "^8.0.2", "redux": "^4.2.0", "redux-thunk": "^2.4.1" }, "devDependencies": { "@babel/core": "^7.12.9", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "^2.0.0", "babel-jest": "^26.6.3", "eslint": "^7.32.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.67.0", "react-test-renderer": "17.0.2" }, "jest": { "preset": "react-native" } }

@NapChen
Copy link

NapChen commented Nov 29, 2022

react-native是0.68.2的话,react-native-amap3d用3.1.1即可

@wubaibin
Copy link
Author

react-native是0.68.2的话,react-native-amap3d用3.1.1即可

用了3.1.1在podfile.lock中还是没有amap,请问如何手动引入

@NapChen
Copy link

NapChen commented Nov 29, 2022 via email

@wubaibin
Copy link
Author

wubaibin commented Nov 29, 2022

就是直接pod install 没有看到有引入。但是安装react-native-amap-geolocation 这个插件pod install 有引入
image

@NapChen
Copy link

NapChen commented Nov 29, 2022 via email

@wubaibin
Copy link
Author

请问该如何解决

@wubaibin
Copy link
Author

请问该如何解决
请问您的rn版本和map版本是多少呢,我试试您的版本看一下

@NapChen
Copy link

NapChen commented Nov 29, 2022

建议你按照如下的步骤试试
1、npx react-native init demo --version 0.68.2
2、yarn add react-native-amap3d@3.1.1
3、cd ios
4、pod install
image

@qilovehua
Copy link

pod install后,把xcode关了重新打开,终端也重新yarn start试试

@wubaibin
Copy link
Author

wubaibin commented Dec 2, 2022

pod install后,把xcode关了重新打开,终端也重新yarn start试试

用yarn 安装可以成功,但是npm有大概率是不行的

@wubaibin wubaibin closed this as completed Dec 2, 2022
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

4 participants