gpt4 book ai didi

android - 构建 ios 应用程序 Cordova 时找不到“Cordova/CDV.h”文件

转载 作者:行者123 更新时间:2023-11-29 00:21:31 24 4
gpt4 key购买 nike

我在 Mac 上使用 cordova 构建我的应用程序的 iOS 版本时遇到问题。当我在同一台机器上为 android 运行此命令时,我收到一条成功消息,

cordova build android 

BUILD SUCCESSFUL

Total time: 1 mins 53.473 secs
Built the following apk(s):
/Volumes/data/app/webapp/cordova/platforms/android/build/outputs/apk/android-debug.apk

但如果我尝试使用此命令为 iOS 生成,则会出现如下所示的错误。

cordova 构建 ios

/Volumes/data/app/webapp/cordova/platforms/ios/TheApp/Plugins/cordova-plugin-device/CDVDevice.m:24:9: fatal error: 
'Cordova/CDV.h' file not found
#import <Cordova/CDV.h>
^
1 error generated.

** BUILD FAILED **


The following build commands failed:
CompileC /Users/User/Library/Developer/Xcode/DerivedData/MyApp-fliapfgngglxfnbapiyopwlziapf/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/AppDelegate.o MyApp/Classes/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/User/Library/Developer/Xcode/DerivedData/MyApp-fliapfgngglxfnbapiyopwlziapf/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MainViewController.o MyApp/Classes/MainViewController.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/User/Library/Developer/Xcode/DerivedData/MyApp-fliapfgngglxfnbapiyopwlziapf/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/CDVDevice.o MyApp/Plugins/cordova-plugin-device/CDVDevice.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(3 failures)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Volumes/data/app/webapp/cordova/platforms/ios/cordova/build-debug.xcconfig,-workspace,TheApp.xcworkspace,-scheme,TheApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 6s Plus,build,CONFIGURATION_BUILD_DIR=/Volumes/data/app/webapp/cordova/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Volumes/data/app/webapp/cordova/platforms/ios/build/sharedpch
Users-MacBook-Pro:cordova User$

任何帮助将不胜感激,谢谢。

最佳答案

在尝试了很多方法都没有成功之后,我跑了:

cordova platform update ios

这为我修复了它。 (XCODE 7.3.1, Cordova 6.3.0)

关于android - 构建 ios 应用程序 Cordova 时找不到“Cordova/CDV.h”文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44112930/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com