android - Ionic Framework Build for IOS on El Capitan - 构建错误(GCC?)

标签 android ios macos gcc ionic-framework

所以我有一个应用程序...Android 构建得很好。 Xcode 已安装并更新(并打开项目,但无法像 Android 那样正常工作)。酿造更新。 GCC 4.9 安装和更新。 GCC 5.x 安装和更新。

更新:

  • Cordova 版本:5.3.3
  • ionic 版本:1.7.5
  • Xcode 版本:7.0.1

当我运行 ionic run iosionic build ios 时,我得到以下信息:

$ ionic build ios
Running command:     /Users/<username>/Documents/Projects/<my app>/hooks/after_prepare/010_add_platform_class.js /Users/<username>/Documents/Projects/<my app>
add to body class: platform-ios
Running command: /Users/<username>/Documents/Projects/<my app>/platforms/ios/cordova/build 
Build settings from command line:
    ARCHS = i386
    CONFIGURATION_BUILD_DIR = /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/emulator
    SDKROOT = iphonesimulator9.0
    SHARED_PRECOMPS_DIR = /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch
    VALID_ARCHS = i386

=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===

Check dependencies

ProcessPCH /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.pch CordovaLib_Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/<username>/Documents/Projects/estore/bin:/usr/local/bin:/Users/<username>/Documents/Projects/estore/bin:/usr/local/bin:/Users/<username>/Documents/Projects/estore/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Android-SDK/tools:/Applications/Android-SDK/tools:/Applications/Android-SDK/tools"
    /usr/local/bin/gcc-4.9 -x objective-c-header -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=6.0 -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-generated-files.hmap -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-own-target-headers.hmap -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-all-target-headers.hmap -iquote /Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-project-headers.hmap -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/build/emulator/include -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/DerivedSources/i386 -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/DerivedSources -F/Users/<username>/Documents/Projects/<my app>/platforms/ios/build/emulator -DDEBUG -MD -MT dependencies -MF /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.d -c /Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/CordovaLib_Prefix.pch -o /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.pch --serialize-diagnostics /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.dia
gcc-4.9: error: /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.dia: No such file or directory
gcc-4.9: error: unrecognized command line option '-fdiagnostics-show-note-include-stack'
gcc-4.9: error: unrecognized command line option '-fmacro-backtrace-limit=0'
gcc-4.9: error: unrecognized command line option '-fobjc-arc'
gcc-4.9: error: unrecognized command line option '-fpascal-strings'
gcc-4.9: error: unrecognized command line option '-Wduplicate-method-match'
gcc-4.9: error: unrecognized command line option '-Wconstant-conversion'
gcc-4.9: error: unrecognized command line option '-Wint-conversion'
gcc-4.9: error: unrecognized command line option '-Wbool-conversion'
gcc-4.9: error: unrecognized command line option '-Wenum-conversion'
gcc-4.9: error: unrecognized command line option '-fasm-blocks'
gcc-4.9: error: unrecognized command line option '-mios-simulator-version-min=6.0'
gcc-4.9: error: unrecognized command line option '-fobjc-legacy-dispatch'
gcc-4.9: error: unrecognized command line option '--serialize-diagnostics'
Command /usr/local/bin/gcc-4.9 failed with exit code 1

** BUILD FAILED **


The following build commands failed:
    ProcessPCH /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.pch CordovaLib_Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
ERROR building one of the platforms: Error: /Users/<username>/Documents/Projects/<my app>/platforms/ios/cordova/build: Command failed with exit code 65
You may not have the required environment or OS to build this project

我被卡住了,我需要构建它...有人可以帮忙吗?

最佳答案

已解决。这是一个权限错误。在 sudo 下运行最初修复了它,然后当我清理其余文件夹的 perms 时,它在没有 sudo 的情况下工作正常。

关于android - Ionic Framework Build for IOS on El Capitan - 构建错误(GCC?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33180005/

相关文章:

java - 如何将数据从 Activity 发送到扩展对话框 fragment 的自定义对话框

尝试使用 pdfrenderer 将 pdf 页面解析为图像时出现 java.lang.NoClassDefFoundError : java. awt.geom.Rectangle2D$Double

iphone - 搜索栏不工作 iPhone Xcode 4.2

ios - pageViewController viewControllerAfter/Before dataSource 方法被调用两次

ios - 使用 UIActivityViewController 导出 CocoaLumberjack 日志

android - IOS/Android 更新时混合 HTML5 应用程序出现问题?

android - "Upstream Google Cloud Messaging and User Notifications Sign-up"是强制性的吗?

macos - Automator + Applescript 如何 : new Desktop (open Calendar and Reminders in it)

ios - 导入开发人员配置文件 .developerprofile 不起作用。仍然需要密码

macos - meteor OSX 错误 : SQLITE_CANTOPEN: unable to open database file