更新时间:2023-11-17 18:26:04
我在安装ShareKit时遇到了同样的问题plugin on Xcode 4.5,cordova 2.1.0& JQM 1.2.0。
有问题的块是:
#ifdef CORDOVA_FRAMEWORK
#import< Cordova / CDVPlugin.h>
#import< Cordova / CDVPluginResult.h>
//#import< Cordova / JSONKit.h>
#else
#importCDVPlugin.h
#importCDVPluginResult.h
#importJSONKit.h
#endif
对我有用的是注释掉 #ifdef
此外,也可以注释掉整个
行已在我使用插件下载的源代码中注释掉了,所以我没有打扰它。 #else
#import< Cordova / JSONKit.h>
I installed the phonegap plugin NotificationEx but I get this error when trying to compile:
CDVPlugin.h file not found.
I'm using Xcode 4.5, cordova 2.2.0 and JQM 1.2.0
any idea what could be wrong?
I had the same problem while installing the ShareKit plugin on Xcode 4.5, cordova 2.1.0 & JQM 1.2.0. The problematic block was:
#ifdef CORDOVA_FRAMEWORK
#import <Cordova/CDVPlugin.h>
#import <Cordova/CDVPluginResult.h>
//#import <Cordova/JSONKit.h>
#else
#import "CDVPlugin.h"
#import "CDVPluginResult.h"
#import "JSONKit.h"
#endif
What worked for me is commenting out the #ifdef
line as well as commenting out the whole #else
block.
Also, the #import <Cordova/JSONKit.h>
line was already commented out in the source code that I downloaded with the plugin, so I didn't bother messing with that.