Xcode command line build failed - ionic-framework

I am using ionic 3 for IOS app development while trying build on command line am getting following error.I am new to MAC(IOS development)
ionic version:3
Xcode version :8.2.1
The following build commands failed:
CompileC /Users/themesoft/Library/Developer/Xcode/DerivedData/MyApp-bkemlyweisesndehdvyeqrojralm/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/IONAssetHandler.o MyApp/Plugins/cordova-plugin-ionic-webview/IONAssetHandler.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
CordovaError: Promise rejected with non-error: 'Error code 65 for command: xcodebuild with args: -xcconfig,/Users/themesoft/Desktop/myapp/platforms/ios/cordova/build-debug.xcconfig,-workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone SE,build,CONFIGURATION_BUILD_DIR=/Users/themesoft/Desktop/myapp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/themesoft/Desktop/myapp/platforms/ios/build/sharedpch'
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.
cordova run ios exited with exit code 1.

Related

flutter new build system error after upgrade to XCode version 12

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Legacy build system detected, removing /Users/simonwong/aipos/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
Xcode build done. 10.7s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
ld: framework not found Flutter
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)

framework not found flutter_plugin_android_lifecycle flutter

Launching lib/main.dart on iPhone 11 in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 58.5s
Failed to build iOS app
Could not build the application for the simulator.
Error launching application on iPhone 11.
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
ld: framework not found flutter_plugin_android_lifecycle
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
dependencies:
flutter_plugin_android_lifecycle: ^1.0.8
try to use this and pod install again

ERROR ng.cmd run app:build:production exited with exit code 127

I tried to build my project with CMD:
ionic build --prod
but I have this error:

ionic cordova run android failed

An error occurred while running subprocess cordova.
cordova.cmd build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.

Cordova build: Command failed with exit code 8

I am building a phone gap (Cordova 3.5) app for android and trying to implement facebook login. I have installed the facebook plugin then i was getting errors in connectPlugin.java file then i imported the facebook SDK library in my project. All errors showing in eclipse are gone now but when i am trying to run 'cordova build' the build fails with the following error.
BUILD FAILED
D:\android-tool\sdk\tools\ant\build.xml:653: The following error occu
executing this line:
D:\android-tool\sdk\tools\ant\build.xml:698: null returned: 1
Total time: 12 seconds
D:\xampp\htdocs\android-app\refund_app\platforms\android\cordova\node
q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,D:\xampp\
oid-app\refund_app\platforms\android\build.xml,-Dout.dir=ant-build,-D
e.dir=ant-gen
Error: D:\xampp\htdocs\android-app\refund_app\platforms\android\cordo
t: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\USER\AppData\Roaming\npm\node_
dova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
I solved this problem by myself actually the build was failing due to a invalid directory in facebook SDK
Mypath/facebook-android-sdk-3.23.0\facebook\bin\res\crunch
I cut all the contents from the 'crunch' folder and pasted it under 'res' folder then deleted the 'crunch' folder. Then cordova build started working.