Cordova platform add windows EACCES error - macos

I was trying to add the windows platform (I use OSX 10.9) and the console gave me this error: EACCES.
bash-3.2# cordova platform add windows
WARNING: Applications for platform windows can not be built on this OS - darwin.
Adding windows project...
Error: spawn EACCES
at exports._errnoException (util.js:746:11)
at ChildProcess.spawn (child_process.js:1155:11)
at Object.exports.spawn (child_process.js:988:9)
at Object.exports.spawn (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:100:31)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform.js:151:39
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)

You can't add Windows cordova platform inside OSX because not supported. You need to use Windows based machine.

Related

How can I build Ionic3 angular4 hybrid application as ios .ipa file?

I am using a windows machine. So I have installed MAC OS sierra using VMWare in the same machine.
I have developed a Ionic3 Angular4 application with Cordova.
I have successfully created the .apk file using the command "ionic cordova build/run android" in my Windows.
So now I want to generate .ipa file. So I just moved the entire project to my MAC OS box. Then installed cordova & Ionic.
Now I am trying to build using command "ionic cordova build/run ios"
But getting the below error
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer
directory '/Library/Developer/CommandLineTools' is a command line tools instance
So executed sudo xcode-select -s /Applications/Xcode.app/Contents/Developer.
But got error /Applications/Xcode.app/Contents/Developer” does not exist
How can overcome these errors and build my ios .ipa file?
Note: Xcode not installed manually. But installed the Xcode via Terminal (a popup opened and asked to install xcode. So clicked install button. Finally It showed Xcode installed successfully)
You will have to install xcode. See the cordova platform guide for iOS. And you will also need the xcode commandline-tools (which you already installed). If you want to run you application in a simulator you will also have to install ios-sim (sudo npm install -g ios-sim#latest). And for deploying your application to a real device ios-deploy (sudo npm install -g ios-deploy#latest)

Ionic Beta 10 iOS Build - You're trying to build for iosbut don't have the platform installed yet

I've been developing on a Windows computer for Android just fine, but once got my hands on a Mac Mini. Once I got the OS updated to El Capitan, XCode installed, and everything else (NodeJS, Ionic, etc.) I tried to do a build for iOS and the build breaks saying:
You're trying to build for iosbut don't have the platform installed yet.
My Ionic Setup is as follows:
Cordova CLI: 5.4.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.12.0
Xcode version: Xcode 7.3.1 Build version 7D1014
The error I get is as follows:
Running 'build:before' gulp task before build
[23:21:58] Starting 'clean'...
[23:21:58] Finished 'clean' after 65 ms
[23:21:58] Starting 'build'...
[23:21:58] Starting 'sass'...
[23:21:58] Starting 'html'...
[23:21:58] Starting 'fonts'...
[23:21:58] Starting 'scripts'...
[23:21:58] Finished 'scripts' after 74 ms
[23:21:58] Finished 'fonts' after 85 ms
[23:21:58] Finished 'html' after 95 ms
[23:21:59] Finished 'sass' after 1.11 s
[23:22:10] Finished 'build' after 12 s
[23:22:10] Starting 'build:before'...
[23:22:10] Finished 'build:before' after 7.64 μs
• You're trying to build for iosbut don't have the platform installed yet.
∆ Installing ios for you.
Installing cordova-plugin-device
Installing cordova-plugin-console
Installing cordova-plugin-whitelist
Installing cordova-plugin-splashscreen
Installing cordova-plugin-statusbar
Installing ionic-plugin-keyboard
Caught exception:
Error: Command failed: cordova plugin add --save cordova-plugin-device
Parsing /Users/esx/projects/xcatalyst%20mobile%20app/config.xml failed
Error: Unencoded <
Line: 2
Column: 2
Char: <
at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
As a side note, I did have Node v6.?.? and Cordova v6.3.0 installed, but there where issues where Cordova CLI showed up as Not Installed when executing "ionic info".
I've also tried to execute "ionic state reset" but get a similar error:
Removed platforms and plugins
Attempting to restore your Ionic application from package.json
Restoring Platforms
cordova platform add ios
cordova platform add android
Restore platforms is complete
Restoring Plugins
cordova plugin add cordova-plugin-whitelist
Caught exception:
undefined
This is my first attempt using a Mac and trying to build an Ionic app using one. I've followed (or tried to) the setup information on the Ionic site (OSX Setup).
I'm unsure of how to track either of these errors down.
Thanks in advance for any help.
The issue was in my config.xml, which had some invalid characters and syntax issues. I guess when building for the android platform this didn't matter, but it did/does for iOS builds.

Ionic build ios does not work with xcode 8 beta

I recently downloaded the Xcode 8 beta and replaced it in applications. Now when I execute "ionic build ios" I get this error:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ERROR building one of the platforms: Error: ***/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: ***/platforms/ios/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
I already tried:
1) ionic platform rm ios
2) ionic platform add ios
Would appreciate some advice. Thanks!
If you run this command:
export DEVELOPER_DIR="/Applications/Xcode-beta.app/Contents/Developer"
I figured out my problem. When you download Xcode 8 beta, it's called "Xcode-beta." I dragged it into Applications and simply deleted the old Xcode. You actually need to re-name the "Xcode-beta" app to "Xcode" for Ionic to recognise it.

ionic build android command not working

am new to ionic, I have followed the steps to setup the environment for developing ionic apps from ionicframework site but am stuck on using the ionic build android command coz I get this error
[Error: Please install Android target: "android-17". Hint: Open the SDK manager by running: C:\Program\ Files\Android\android-sdk\tools\android.BAT
You will require:
1. "SDK Platform" for android-17
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 2
and all these build-tools and platform-tools are installed.what might be the problem please.The android command on win cmd is working well coz its openning the sdk manager
Error image

Unable to compile a python script using buildozer

I am using win 32 python 2.7 and kivy 1.8.0 but on compiling using buildozer for creating an Android app it is showing the following error:
C:\Python27\Scripts>buildozer android debug deploy
I check configuration tokens
Unknown command/target android
Although buildozer works on Windows, python-for-android does not. You need to use OSX or Linux to make an APK with Kivy. Kivy provides a Linux virtual machine for your convenience.

Resources