qiuxiang / react-native-amap3d

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

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

Closed wubaibin closed 1 year ago

wubaibin commented 1 year ago

RN版本0.68.2 amap 3.1.2 WechatIMG129 WechatIMG128

wubaibin commented 1 year ago

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

wubaibin commented 1 year ago

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

sunnylqm commented 1 year ago

我好像回答过你一模一样的问题? https://github.com/reactnativecn/react-native-website/issues/618

wubaibin commented 1 year ago

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

sunnylqm commented 1 year ago

检查podfile.lock中有amap吗

wubaibin commented 1 year ago

检查podfile.lock中有amap吗

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

sunnylqm commented 1 year ago

贴下package.json

wubaibin commented 1 year ago

贴下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 commented 1 year ago

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

wubaibin commented 1 year ago

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

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

NapChen commented 1 year ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

不需要手动引入,按照readme就行,yarn add react-native-amap3d安装完直接pod install

---- 回复的原邮件 ----

     发件人 

        ***@***.***>

     发送日期 

    2022年11月29日 20:42

     收件人 

        ***@***.***>

     抄送人 

        ***@***.***>
        ,

        ***@***.***>

     主题 

          Re: [qiuxiang/react-native-amap3d] iOS真机上报"AMapView" was not found in the UlManager和null is not an object (evaluating 'AMapSdk.initSDK')错误 (Issue #775)

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

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

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

wubaibin commented 1 year ago

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

image
NapChen commented 1 year ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

用3.1.1你就会看到,之后因为发布了react-native 0.70作者升级了,好想就存在需要手动引入的问题

---- 回复的原邮件 ----

     发件人 

        ***@***.***>

     发送日期 

    2022年11月29日 20:50

     收件人 

        ***@***.***>

     抄送人 

        ***@***.***>
        ,

        ***@***.***>

     主题 

          Re: [qiuxiang/react-native-amap3d] iOS真机上报"AMapView" was not found in the UlManager和null is not an object (evaluating 'AMapSdk.initSDK')错误 (Issue #775)

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

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

wubaibin commented 1 year ago

请问该如何解决

wubaibin commented 1 year ago

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

NapChen commented 1 year ago

建议你按照如下的步骤试试 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 commented 1 year ago

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

wubaibin commented 1 year ago

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

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