Could not build module 'UIKit" in cocoapods si

2019-02-21 09:44发布

I cannot build my application anymore since I updated Xcode to the new version (Xcode 5.1). the error message is 'Could not build module 'UIKit''. I have the same problems with my two pods: AFNetworking SDWebImage

Any thought on this?

15条回答
Deceive 欺骗
2楼-- · 2019-02-21 10:04

Issue looks like it has to do with deployment - going through both the project, pod project, and individual pods to make sure all were set the same was the issue. a bit of a necro, but this is the right answer.

查看更多
相关推荐>>
3楼-- · 2019-02-21 10:06

My Problem was the app was running in Release mode Changing back to debug...Boom!! starts working

查看更多
聊天终结者
4楼-- · 2019-02-21 10:10

I met the similar problem. The only difference is that my error is "Could not build module SpriteKit".

I finally solved the problem by deleting all files inside the ModuleCache folder: /Users/YOUR_USER_NAME/Library/Developer/Xcode/DerivedData/ModuleCache Then I build and met errors to prompt me to clean build. I clean the project and rebuild and everything is fine.

I think the cause is that I once played Xcode 6, and it has new modules which missing some architectures (in my case, it is armv7). These new modules pollute the module cache.

查看更多
We Are One
5楼-- · 2019-02-21 10:11

Go to your DerivedData directory and remove ModuleCache directory.

In terminal:

cd /Users/<account_name>/Library/Developer/Xcode/DerivedData
rm -rf ModuleCache/

then reinstall pods: pod install.

If it doesn't help try removing whole DerivedData directory and reinstall pods.

查看更多
Melony?
6楼-- · 2019-02-21 10:12

change xcodebuild commnad parameter

-sdk iphoneos

to

-sdk iphonesimulator 
查看更多
贼婆χ
7楼-- · 2019-02-21 10:13

I was working on xcode 8 beta and project was building on simulator. But when I tried to run on Device. I got the same error

Could not build module 'UIKit"

It is due to UIKit framwork some how get deleted or Typed something inside it. Deleting Xcode and reinstalling it. Error got solved.

查看更多
登录 后发表回答