Pods 更新后提示Bundle资源找不到

发布于 2021-12-02 07:22:18 字数 4648 浏览 758 评论 6

  • 当前Podfile运行正常

rubytekiMacBook-Pro:DecorationBus ruby$ cat Podfile
platform :ios, '7.0'
    pod 'MWPhotoBrowser', '~> 2.1.1'
    pod 'UMengAnalytics-NO-IDFA', '~> 3.4.7'
    pod 'MJRefresh', '~> 3.0.4'
    pod 'MDRadialProgress', '~> 1.3.2'
    pod 'MOBFoundation_IDFA', '~> 1.3.1'
    pod 'SMSSDK', '~> 2.0.0'



  • 升级Pod到1.0.0.beta.4
rubytekiMacBook-Pro:DecorationBus ruby$ pod --version
1.0.0.beta.4



  • 更新Pod资源(由于Pods升级,引入了target的概念,必须在Podfile中指定target, 此步必失败)

rubytekiMacBook-Pro:DecorationBus ruby$ pod install
Re-creating CocoaPods due to major version update.
Updating local specs repositories

CocoaPods 1.0.0.beta.6 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.0.0.beta.6

Analyzing dependencies
[!] The dependency `MWPhotoBrowser (~> 2.1.1)` is not used in any concrete target.
The dependency `UMengAnalytics-NO-IDFA (~> 3.4.7)` is not used in any concrete target.
The dependency `MJRefresh (~> 3.0.4)` is not used in any concrete target.
The dependency `MDRadialProgress (~> 1.3.2)` is not used in any concrete target.
The dependency `MOBFoundation_IDFA (~> 1.3.1)` is not used in any concrete target.
The dependency `SMSSDK (~> 2.0.0)` is not used in any concrete target.



  • 按照官方guide修改Podfile

rubytekiMacBook-Pro:DecorationBus ruby$ cat Podfile
platform :ios, '7.0'
target 'DecorationBus' do
    pod 'MWPhotoBrowser', '~> 2.1.1'
    pod 'UMengAnalytics-NO-IDFA', '~> 3.4.7'
    pod 'MJRefresh', '~> 3.0.4'
    pod 'MDRadialProgress', '~> 1.3.2'
    pod 'MOBFoundation_IDFA', '~> 1.3.1'
    pod 'SMSSDK', '~> 2.0.0'
end



  • 更新Pods

rubytekiMacBook-Pro:DecorationBus ruby$ pod update
Update all pods
Re-creating CocoaPods due to major version update.
Updating local specs repositories

CocoaPods 1.0.0.beta.6 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.0.0.beta.6

Analyzing dependencies
Downloading dependencies
Installing DACircularProgress (2.3.1)
Installing MBProgressHUD (0.9.2)
Installing MDRadialProgress (1.3.2)
Installing MJRefresh (3.0.8)
Installing MOBFoundation_IDFA (1.3.1)
Installing MWPhotoBrowser (2.1.1)
Installing SDWebImage (3.7.5)
Installing SMSSDK (2.0.4)
Installing UMengAnalytics-NO-IDFA (3.4.7)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 6 dependencies from the Podfile and 9 total pods installed.



  • 编包提示MWPhotoBrowser.bundle找不到
PhaseScriptExecution Copy Pods Resources /Users/ruby/Library/Developer/Xcode/DerivedData/DecorationBus-ewahmhbzzgyytwefamtwlzktzjpt/Build/Intermediates/DecorationBus.build/Debug-iphonesimulator/DecorationBus.build/Script-1B153D9A39078434770F20CE.sh
    cd /Users/ruby/horen/gitHub/DecorationBus
    /bin/sh -c /Users/ruby/Library/Developer/Xcode/DerivedData/DecorationBus-ewahmhbzzgyytwefamtwlzktzjpt/Build/Intermediates/DecorationBus.build/Debug-iphonesimulator/DecorationBus.build/Script-1B153D9A39078434770F20CE.sh

/Users/ruby/horen/gitHub/DecorationBus/Pods/MJRefresh/MJRefresh/MJRefresh.bundle
/Users/ruby/horen/gitHub/DecorationBus/Pods/SMSSDK/SMSSDKUI.bundle
error: Resource "/Users/ruby/Library/Developer/Xcode/DerivedData/DecorationBus-ewahmhbzzgyytwefamtwlzktzjpt/Build/Products/Debug-iphonesimulator/MWPhotoBrowser.bundle" not found. Run 'pod install' to update the copy resources script.



  • 按照指示再次”pod install“, 问题依然存在


有朋友提示,怀疑是我使用的beta版pods的缘故,正在尝试降级。有结果回来更新.


如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

私藏温柔 2021-12-03 21:40:28

请问我的项目不是swift项目也出现这个问题,是什么原因?

各自安好 2021-12-03 20:21:57

1.use_frameworks!

如果是swift项目,则必须写这句

-》旧的ObjectC的项目,不需要写这句

2.target 'DecorationBus' do 中的DecorationBus

是你的项目的名字。

秋意浓 2021-12-03 12:25:41

target '这是是项目的target名称 再简单点就是项目名称 但是不一定' do

陌若浮生 2021-12-03 06:50:15

回复
更准确的说应该是target名称。一个项目中可以有多个target。

猫九 2021-12-02 23:34:36

想问下:下面的“DecorationBus”是什么呀?

platform :ios, '8.0'

use_frameworks!

target 'DecorationBus' do

    pod 'MWPhotoBrowser', '~> 2.1.1'

    pod 'UMengAnalytics-NO-IDFA', '~> 3.4.7'

    pod 'MJRefresh', '~> 3.0.4'

    pod 'MDRadialProgress', '~> 1.3.2'

    pod 'MOBFoundation_IDFA', '~> 1.5.1'

    pod 'SMSSDK', '~> 2.0.4'

    pod 'KMPlaceholderTextView', '~> 1.1.2'

end

挽清梦 2021-12-02 22:28:37

自己回来结贴。更新Podfile

rubytekiMacBook-Pro:DecorationBus ruby$ cat Podfile
platform :ios, '8.0'
use_frameworks!

target 'DecorationBus' do
    pod 'MWPhotoBrowser', '~> 2.1.1'
    pod 'UMengAnalytics-NO-IDFA', '~> 3.4.7'
    pod 'MJRefresh', '~> 3.0.4'
    pod 'MDRadialProgress', '~> 1.3.2'
    pod 'MOBFoundation_IDFA', '~> 1.5.1'
    pod 'SMSSDK', '~> 2.0.4'
    pod 'KMPlaceholderTextView', '~> 1.1.2'
end

注意标红色的必填!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文