找到原因,回答如下。
我刚刚克隆了一个远程git存储库。它有一个工作区,有2个项目。主要和豆荚。
当我尝试运行我的主项目时,出现错误
“词法或预处理器问题:找不到'../Pods-Environment.h'文件。
UI7Kit正在导入此文件
//
// UI7Kit.h
// UI7Kit
//
// Created by Jeong YunWon on 13. 6. 11..
// Copyright (c) 2013 youknowone.org. All rights reserved.
//
/*!
* #import <UI7Kit/UI7Kit.h>
* [UI7Kit pssatchIfNeeded]; // in main.m, before UIApplicationMain()
*/
#ifdef COCOAPODS
#include "../Pods-environment.h"
#else // no cocoapods, so enable everything
我试图重新同步,但没有什么不同,任何想法如何解决这个问题?
答案 0 :(得分:0)
所以,在一些失败之后,我发现了发生了什么。
我的项目曾经有过不同的UI7Kit.h文件。它甚至没有导入“../Pods-environment.h”。 - 导致错误的文件。
每次运行pod安装时,我都会覆盖修改过的文件。
如果有人需要更新的文件,它看起来像这样:
//
// UI7Kit.h
// UI7Kit
//
// Created by Jeong YunWon on 13. 6. 11..
// Copyright (c) 2013 youknowone.org. All rights reserved.
//
/*!
* #import <UI7Kit/UI7Kit.h>
* [UI7Kit patchIfNeeded]; // in main.m, before UIApplicationMain()
*/
#if __has_include(<UI7Kit/UI7Button.h>)
#define UI7KIT_HAS_QUARTZCORE
#endif
#if __has_include(<UI7Kit/UI7PickerView.h>)
#define UI7KIT_HAS_QUARTZCORE
#endif
#if __has_include(<UI7Kit/UI7SearchBar.h>)
#define UI7KIT_HAS_QUARTZCORE
#endif
#if __has_include(<UI7Kit/UI7SegmentedControl.h>)
#define UI7KIT_HAS_QUARTZCORE
#endif
#if __has_include(<UI7Kit/UI7Stepper.h>)
#define UI7KIT_HAS_QUARTZCORE
#endif
#if __has_include(<UI7Kit/UI7TextField.h>)
#define UI7KIT_HAS_QUARTZCORE
#endif
#ifdef UI7KIT_HAS_QUARTZCORE
#import <QuartzCore/QuartzCore.h>
#endif
// Core
#import <UI7Kit/UI7KitCore.h>
#import <UI7Kit/UI7Utilities.h>
#ifdef COCOAPODS
#if __has_include(<UI7Kit/UI7Font.h>)
#import <UI7Kit/UI7Font.h>
#endif
#if __has_include(<UI7Kit/UI7AlertView.h>)
#import <UI7Kit/UI7AlertView.h>
#endif
#if __has_include(<UI7Kit/UI7ActionSheet.h>)
#import <UI7Kit/UI7ActionSheet.h>
#endif
#if __has_include(<UI7Kit/UI7BarButtonItem.h>)
#import <UI7Kit/UI7BarButtonItem.h>
#endif
#if __has_include(<UI7Kit/UI7Button.h>)
#import <UI7Kit/UI7Button.h>
#endif
#if __has_include(<UI7Kit/UI7NavigationBar.h>)
#import <UI7Kit/UI7NavigationBar.h>
#endif
#if __has_include(<UI7Kit/UI7NavigationController.h>)
#import <UI7Kit/UI7NavigationController.h>
#endif
#if __has_include(<UI7Kit/UI7ProgressView.h>)
#import <UI7Kit/UI7ProgressView.h>
#endif
#if __has_include(<UI7Kit/UI7PickerView.h>)
#import <UI7Kit/UI7PickerView.h>
#endif
#if __has_include(<UI7Kit/UI7SearchBar.h>)
#import <UI7Kit/UI7SearchBar.h>
#endif
#if __has_include(<UI7Kit/UI7SegmentedControl.h>)
#import <UI7Kit/UI7SegmentedControl.h>
#endif
#if __has_include(<UI7Kit/UI7Slider.h>)
#import <UI7Kit/UI7Slider.h>
#endif
#if __has_include(<UI7Kit/UI7Stepper.h>)
#import <UI7Kit/UI7Stepper.h>
#endif
#if __has_include(<UI7Kit/UI7TabBar.h>)
#import <UI7Kit/UI7TabBar.h>
#endif
#if __has_include(<UI7Kit/UI7TabBarItem.h>)
#import <UI7Kit/UI7TabBarItem.h>
#endif
#if __has_include(<UI7Kit/UI7TabBarController.h>)
#import <UI7Kit/UI7TabBarController.h>
#endif
#if __has_include(<UI7Kit/UI7TableView.h>)
#import <UI7Kit/UI7TableView.h>
#endif
#if __has_include(<UI7Kit/UI7TextField.h>)
#import <UI7Kit/UI7TextField.h>
#endif
#if __has_include(<UI7Kit/UI7Toolbar.h>)
#import <UI7Kit/UI7Toolbar.h>
#endif
#if __has_include(<UI7Kit/UI7View.h>)
#import <UI7Kit/UI7View.h>
#endif
#if __has_include(<UI7Kit/UI7ViewController.h>)
#import <UI7Kit/UI7ViewController.h>
#endif
#if __has_include(<UIKitExtension/UIKitExtension.h>)
#import <UIKitExtension/UIKitExtension.h>
#endif
#else // no cocoapods, so enable everything
#import <UI7Kit/UI7Font.h>
#import <UI7Kit/UI7AlertView.h>
#import <UI7Kit/UI7ActionSheet.h>
#import <UI7Kit/UI7BarButtonItem.h>
#import <UI7Kit/UI7Button.h>
#import <UI7Kit/UI7NavigationBar.h>
#import <UI7Kit/UI7NavigationController.h>
#import <UI7Kit/UI7ProgressView.h>
#import <UI7Kit/UI7PickerView.h>
#import <UI7Kit/UI7SearchBar.h>
#import <UI7Kit/UI7SegmentedControl.h>
#import <UI7Kit/UI7Slider.h>
#import <UI7Kit/UI7Stepper.h>
#import <UI7Kit/UI7TabBar.h>
#import <UI7Kit/UI7TabBarItem.h>
#import <UI7Kit/UI7TabBarController.h>
#import <UI7Kit/UI7TableView.h>
#import <UI7Kit/UI7TextField.h>
#import <UI7Kit/UI7Toolbar.h>
#import <UI7Kit/UI7View.h>
#import <UI7Kit/UI7ViewController.h>
#import <UIKitExtension/UIKitExtension.h>
#endif // ifdef COCOAPODS
感谢@trojanfoe和@Fogmeister试图帮助我。