代码之家  ›  专栏  ›  技术社区  ›  eirikvaa

无法生成Objective-C模块“CoreGraphics”

  •  2
  • eirikvaa  · 技术社区  · 9 年前

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:10: note: while building module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:
    #include <CoreFoundation/CFBase.h>
         ^
    <module-includes>:1:9: note: in file included from <module-includes>:1:
    #import "Headers/CoreFoundation.h"
        ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
    #include <CoreFoundation/CFBase.h>
         ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
    #include <Block.h>
         ^
    /Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/table/Block.h:10:10: note: in file included from /Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/table/Block.h:10:
    #include "leveldb/iterator.h"
         ^
    /Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/include/leveldb/iterator.h:18:10: note: in file included from /Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/include/leveldb/iterator.h:18:
    #include "leveldb/slice.h"
    
    /Users/eirik/Documents/Utvikling/iOS/ProsjekterSamarbeid/AnchorPoint Fishing as/FerskFiskiOS/Pods/leveldb-library/include/leveldb/slice.h:21:10: error: 'string' file not found
    #include <string>
         ^
    <module-includes>:1:9: note: in file included from <module-includes>:1:
    #import "Headers/CoreGraphics.h"
        ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8:
    #include <CoreGraphics/CGBase.h>
         ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:10: error: could not build module 'CoreFoundation'
    #include <CoreFoundation/CFBase.h>
         ^
    <unknown>:0: error: could not build Objective-C module 'CoreGraphics'
    

    我在Swift 3.2模式和CocoaPods中使用Xcode 9。我正在使用Firebase和FirebaseUI leveldb 作为依赖项。您可以看到,该错误首先在中触发 leveldb/slice.h ,无法找到 string

    到目前为止,我已经尝试了以下几点:

    • 清洁(Shift+CMD+K)
    • 删除衍生数据
    • 清理生成文件夹。。。
    • 允许在生成设置中包含非模块化的框架内模块。
    • pod deintegrate , pod clean pod install .

    值得一提的是,问题导航器中存在以下错误: Error in Issue Navigator

    有什么建议吗?

    1 回复  |  直到 9 年前
        1
  •  0
  •   Paul Beusterien    9 年前

    这看起来像一个 CocoaPods issue 这在CocoaPods 1.4.0中得到了修复。没有为单元测试目标正确设置搜索路径。

    尝试更新到CocoaPods 1.4.0测试版并重新运行 pod update

    或 here 对于leveldb路径:

    添加 "${PODS_ROOT}/leveldb-library/include" 仅在以下条件下达到测试目标 Build Settings -> Header Search Paths