qiuxiang / react-native-amap3d

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

cocoapod的pod install 时出现静态statically linked binaries #561

Open asagcs opened 4 years ago

asagcs commented 4 years ago

react-native 0.59.3 react-native-cli 2.0.1 react-native-amap3d 1.1.1 平台: mac ios 因为开发需要同时开发Android 所以link过 报错:The 'Pods-sandmall' target has transitive dependencies that include statically linked binaries: (/Users/xxhuashui/sand-shop/ios/Pods/AMap3DMap/MAMapKit.framework) 如果不尝试注释user_frameworks!,该怎么解决。如果尝试,user_frameworks在哪? 以下是podfile:

Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target ' ' do

Comment the next line if you don't want to use dynamic frameworks

use_frameworks!

Pods for

end

target 'sandmall' do

Comment the next line if you don't want to use dynamic frameworks

use_frameworks!

Pods for sandmall

pod 'React', :path => '../node_modules/react-native', :subspecs => [ 'Core', 'CxxBridge', # Include this for RN >= 0.47 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # needed for debugging

Add any other subspecs you want to use in your project

]

Explicitly include Yoga if you are using RN >= 0.42.0

pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

Third party deps podspec link

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'react-native-amap3d', path: '../node_modules/react-native-amap3d/lib/ios'

end

post_install do |installer| installer.pods_project.targets.each do |target| if target.name == "React" target.remove_from_project end end end

Ekhui commented 4 years ago

我也是这个情况 老哥有思路吗

asagcs commented 4 years ago

我也是这个情况 老哥有思路吗

现有的仅有的思路是podfile文件中注释掉use_frameworks!

Ekhui commented 4 years ago

use_frameworks

我引用了另外的第三方react-native-file-selector文件选择器 它里面有一个依赖FileBrowser 需要use_frameworks! 我现在就是这两个东西冲突了 欲哭无泪

Ekhui commented 4 years ago

@qiuxiang 请问作者大哥有没有解决思路呢 因为这个加班好多天了。。

asagcs commented 4 years ago

不好意思啊   我也没其他办法

---原始邮件--- 发件人: "Ekhui"<notifications@github.com> 发送时间: 2019年10月30日(星期三) 晚上6:19 收件人: "qiuxiang/react-native-amap3d"<react-native-amap3d@noreply.github.com>; 抄送: "asagcs"<1261167816@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [qiuxiang/react-native-amap3d] cocoapod的pod install 时出现静态statically linked binaries (#561)

use_frameworks

我引用了另外的第三方react-native-file-selector文件选择器 它里面有一个依赖FileBrowser 需要use_frameworks! 我现在就是这两个东西冲突了 欲哭无泪

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

miaoyumeng commented 4 years ago

我也是这个情况 老哥有思路吗

请问有解决办法了吗?

asagcs commented 4 years ago

除了注释掉use_frameworks!暂时没有

---原始邮件--- 发件人: "wuhaha"<notifications@github.com> 发送时间: 2019年12月3日(周二) 下午2:58 收件人: "qiuxiang/react-native-amap3d"<react-native-amap3d@noreply.github.com>; 抄送: "asagcs"<1261167816@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [qiuxiang/react-native-amap3d] cocoapod的pod install 时出现静态statically linked binaries (#561)

我也是这个情况 老哥有思路吗

请问有解决办法了吗?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Lenlyl commented 3 years ago

不用注释掉use_frameworks! 在../node_modules/react-native-amap3d/ios/react-native-amap3d.podspec文件中增加一行代码搞定 s.static_framework = true

/*位置 / s.dependency 'React' s.dependency 'AMap3DMap', "~> 7.2.0" s.static_framework = true

hbolin commented 3 years ago

不用注释掉use_frameworks! 在../node_modules/react-native-amap3d/ios/react-native-amap3d.podspec文件中增加一行代码搞定 s.static_framework = true

/*位置 / s.dependency 'React' s.dependency 'AMap3DMap', "~> 7.2.0" s.static_framework = true

真实有效,给你点赞

karte796 commented 2 years ago

折腾了好几天,终于找到一个东西cocoapods-user-defined-build-types,可以替代use_frameworks! 用法是这样 `plugin 'cocoapods-user-defined-build-types'

enable_user_defined_build_types!

target "CoffeeApp" do pod 'Alamofire' pod "SwiftyJSON", :build_type => :dynamic_framework`