Build phonegap windows8 project using command line - windows

I want to build a phonegap project (on windows 8.1) for windows 8 but somehow I get an error. Building a Android project goes without any errors. When I run the command 'phonegap run windows8' I get the following error:
I also tried 'phonegap install windows8', same problem. I installed phonegap last week using 'npm install -g phonegap'. Maybe a stupid question, but how do I know I use the latest release (currently 2.9.1)? When I do 'phonegap version' it returns 3.3.0-0.18.0.

I installed cordova instead of phonegap in my command-line (npm install cordova). with cordova everything went just fine. I searched in the platform list of the phonegap install and noticed phonegap doesn't support windows 8. Very confusing since the phonegap website tells us to install phonegap instead of cordova. If anyone has question about building a app phonegap for windows 8 let me know.

Related

Build an existing ionic2 app using windows phone platform

I have ionic2 app that already works on (Android & IOS) platforms.
After I have copied the source folder to Win7 and downloaded the requirements
I did
1) ionic cordova platform add windows#6.0.0
2) cordova build windows -- --appx=8.1-phone
I got a .sln file in platform/windows folder and output in platforms/windows/AppPackages folder.
but the output .appx file was too small (3.625 K) just like an empty app with splashscreen (contains cordova icon).
Here is the end of the second command
The cordova requirements
I have solved this issue by creating a new ionic app
ionic start MyIonicProject tutorial
and replaced the src folder and every thing what I need from my app with the current .
and after that
ionic cordova platform add windows#6.0.0
cordova run windows
It works like a charm :)
I tried every thing else and didn't get any result.
To build apps for Windows Universal, download and install Visual Studio 2015 Community Edition. During the installation, Select “Tools for Cross Platform Development” as well as the SDK for Windows Universal Apps.
With everything installed, you’ll be able to add a windows platform from the command line with this command:
ionic cordova platform add windows
By default the build command produces two packages: Windows 8.1 and Windows Phone 8.1, which Ionic does not support. To upgrade Windows package to version 10 the following configuration setting must be added to configuration file (config.xml).
<preference name="windows-target-version" value="10.0" />

Apache Cordova The system cannot find the file specified

I am developing Apache Cordova app on vs 2015 community with Angularjs on onsen.
And keep getting "The system cannot find the file specified" error no matter what i've done.
Things that i've done so far:
Clear cordova cache, Clean, Rebuild (like a hundred times)
Format pc, install everything
Copied the solution to another pc and worked fine nothing is wrong but does not work on my pc.
Close vs instances and change the folder name under Appdata/roaming/microsoft/local/phonetools/Corecon
And nothing changed still getting the same error when deploy starts.
My NPM version is 3.10.10, Cordova CLI is 6.1.1, nodejs version is 6.9.4 and JDK version is 1.8.3

Ionic trouble: can't build to android

I've got an Ionic 3.4 project and trying to build it to Android for testing purposes.
I installed Android Studio and the Android SDK, aswell Java 8. Then did:
ionic cordova platform add android
Then, when I write...
ionic build android
... I get the following error:
cordova build android ✖ Running command - failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova build android (exit
code 1):
ANDROID_HOME=C:\Users\Zerok\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_121
Error: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
What's going on? I also installed Gradle 4.0 into the Java folder, and pointed towards it in the GRADLE_HOME environment variable:
Var name: GRADLE_HOME
Value: C:\Program Files\Java\gradle-4.0
Also added the following to the path:
GRADLE_HOME\bin
But it still throws the same error... I don't think it's a problem with plugins, but with the Ionic/Cordova build system. What I don't understand, is why it needs Gradle when it's perfectly working in Android Studio, maybe it's because it's not in C:/, but a different disk? Any ideas?
(Assuming Windows 10)
open Start Menu, type path and hit Enter
System Properties will open. On the bottom click Environment Variables...
In the window that opens, on the bottom section named System Variables, double click Path
Click New and copy paste the path to your gradle installation
Make sure the path environment variable points to the bin folder of gradle like so: export PATH="$PATH:/home/jeffbl/android-studio/gradle/gradle-3.2/bi‌​n".
If that doesn't work try:
$ cordova platform rm android && cordova platform add https://github.com/apache/cordova-android && cordova build
If that doesn't work then use the SDK manager to downgrade to an earlier version of your SDK. It might be that there is no graddle wrapper out yet for the latest.
In any case you will find the answer to your problem in this github issue.
Ok, I already fixed it. And the fix is weird as hell, but well, at least it works.
Solution: uninstall Android Studio and install it in the main drive (C in my case). Everything began to work perfectly after this clean install.

Titanium CLI alloy execution location

I recently wrote a small hack to enable writing Titanium apps with TypeScript (https://github.com/developer82/Ti.TypeScript). This involves editing the SDK alloy compiler script.
As you can tell from what I've written the script is located at /Users/YOUR_USERNAME/.appcelerator/install/SDK_VERSION/package/node_modules/alloy/Alloy/commands/compile/index.js
When I run my project from Titanium Studio it works great. However when I try to run from command line using ti build -p ios I'm getting an error This project requires the TypeScript hack in Titnaium SDK - which is a validation I wrote that the hack was applied to the compiler.
The reason for this is that running from command line, the CLI is looking for alloy in /usr/local/bin/alloy - I learned that from the following output:
[INFO] Executing Alloy compile: /usr/local/bin/node /usr/local/bin/alloy compile /Users/ophir/Documents/Appcelerator_Studio_Workspace/MY_PROJECT/app --config platform=ios,version=0,simtype=none,devicefamily=universal,deploytype=development,target=simulator
Why the different location? Why the CLI doesn't work like Appcelerator Studio? how can I make it work like Appc Studio?
Solution turned up to simpler than I thought... instead of using ti command I started using appc command:
appc run --platform iphone --liveview
I think ti is the open source version (which uses the alloy installed from node) and appc is the Appcelerator platform (that's what Appcelerator Studio runs).

ionic build android doesn't do anything

I am trying to set up ionic in my Windows 7 machine. I follow the steps here http://ionicframework.com/docs/guide/installation.html.
When i do the step, ionic add platform android, it does nothing. ionic platform android tries to download cordova-android but not sure if its fine. Below are my console logs. Can someone help me how to solve this issues.
C:\inv-mob\todo>ionic platform android
npm http GET https://registry.npmjs.org/cordova-android/3.6.3
npm
C:\inv-mob\todo>ionic build android
C:\inv-mob\todo>
reinstalling the android sdk worked.

Resources