【问题标题】:Base SDK missing for PhoneGap-based iOS application基于 PhoneGap 的 iOS 应用程序缺少基本 SDK
【发布时间】:2011-11-30 09:02:24
【问题描述】:

我已经为 iOS 安装了 PhoneGap 库并创建了一个新项目,但是当我运行应用程序时,我收到了错误 Base SDK missing。这是为什么呢?

编辑 1

应用 mAc 回复后出现 230 个错误,这些是一些错误:

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:60:23 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:60:23: error: expected function body after function declarator


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:91 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:91: error: expected a type


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:256:86 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:256:86: error: expected a type


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:258:114 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:258:114: error: expected a type


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:187:31 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:187:31: error: unknown type name 'UIApplicationState'


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:190:4 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:190:4: error: expected a type


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:191:28 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:191:28: error: expected a type


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:202:45 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:202:45: error: expected a type


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:206:4 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:206:4: error: expected a type


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITextView.h:82:22 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITextView.h:82:22: error: unknown type name 'UIDataDetectorTypes'


/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWebView.h:54:22 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWebView.h:54:22: error: unknown type name 'UIDataDetectorTypes'


/Users/Ahmed/Documents/PhoneGapLib/Classes/Camera.h:56:10 /Users/Ahmed/Documents/PhoneGapLib/Classes/Camera.h:56:10: error: cannot find protocol declaration for 'UIPopoverControllerDelegate'; did you mean 'UITabBarControllerDelegate'?


/Users/Ahmed/Documents/PhoneGapLib/Classes/Camera.m:24:3 /Users/Ahmed/Documents/PhoneGapLib/Classes/Camera.m:24:3: error: use of undeclared identifier 'UIUserInterfaceIdiomPhone'; did you mean 'UIUserInterfaceIdiom'?

【问题讨论】:

  • 您要针对哪个基础 SDK 构建?您的机器上有哪些可用的?

标签: iphone ios cordova


【解决方案1】:

我认为你已经导入了一个项目...

查看选择您的项目并转到其 INFO -> 在构建选项卡中 -> 架构 -> 在 Base SDK 中选择最新的 iOS -> 保存 n 关闭。现在选择模拟器(默认选择设备)。 然后运行应用程序。

已编辑:-

可能是 Xcode 3.2.4 或 SDK 配置中的错误。

尝试在您的构建设置预处理器宏中放置类似以下之一的行:

-D__IPHONE_OS_VERSION_MIN_REQUIRED=040100 

-D__IPHONE_OS_VERSION_MIN_REQUIRED=030103

您也可以Check Here 处理您的问题。

希望对你有帮助:) Adios

【讨论】:

  • 可能是因为您使用的是 LLVM 2.0。 LLVM 2.0 无法为 iPhone 模拟器构建。 GCC 4.2 工作正常。
【解决方案2】:

在 project.pbxproj 文件中,我不得不在几个地方进行更改:

IPHONEOS_DEPLOYMENT_TARGET = 5.0;

IPHONEOS_DEPLOYMENT_TARGET = 6.1;

【讨论】:

    猜你喜欢
    • 2011-03-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-12
    • 1970-01-01
    • 1970-01-01
    • 2012-09-07
    相关资源
    最近更新 更多