PhoneGap 3.1 Local Build WP8 - node.js

I'm trying to play with new phonegap-cli main focus is to setup wp8 platform
and when running command:
phonegap build wp8
It tries to use PhoneGap Build, which I presume happens because it hasn't found
my installed SDK in any path.
I tried to test my thesis and ran this command:
phonegap local build wp8
And it returns this error:
I have .NET Framework v4.0 installed, so this path exists:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
So the only thing I think happens is that phonegap can't find where SDK is installed,
so I have been searching through the documentation and I couldn't find anything regarding which Environment Variable PhoneGap checks.
So I would really appreciate any kind of help here.

Please make sure that you have added the framework path to the system PATH variable.
In my case it was the above reason and also related to Ant installed and configuration.

Alternatively you can use phonegap's online build service:
https://build.phonegap.com/
It works like a charm and is free for 1 private project.

Related

Couldn't generate a APK folder (Gradle issue)

I can't seemed to generate the APK. and this pops up!
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().
Please assist.
Which is your global java version?
Put some more information. Ionic info output and Android Studio version.
Try to downgrade your java version to 8
if you do not know how to change your java version, google it!

Apache cordova how to generate release apk

Before i start, i will warn you guys that im not an app developer and that i did not code this app, and that i have no expirience with apache cordova.
So i'm using apache cordova in visual studio 2013 and i'm here trying to get the release .apk but when i try to run a release build on a device i get the following error.
"Android packages must be signed when debugging using the Release or Distribution configurations." I've been googling solutions to this but i could not find any, though i did find that i need to change several things to get the .apk file i want.
So the first step would be making a keystore for the app right? Well, i have no clue on how to do this, and all the answers i found where using the cordova cli which i don't even know how to open. Can anyone tell me what a keystore is and how do i get it. If i need to use the cordova cli how do i open it.
After this, what should i do?

cordova hybrid app build fail with vs2013 up2 (chinese traditional)

I build cordova project with vs2013 up2 for windows phone platform and receive some error as follow , but build for ios & android is ok .
(1)Non-whitespace before first tag.
I found the js file "C:\Users\xxx\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\plugman\src\util\xml-helpers.js" in line 124 command
var contents = fs.readFileSync(filename, 'utf-8').replace("\ufeff", "");
...is failing in chinese traditional environment, when building for windows phone platform the WMAppManifest.xml file has BOM code , so will be error as 嚙踝蕭??xml version="1.0" encoding="utf-8"?>, it should be <?xml version="1.0" encoding="utf-8"?>
have any idea can fix it ?
Thanks.
The issue you are seeing (issues.apache.org/jira/browse/CB-5477) was fixed in Cordova 3.5
(I'm a new poster and haven't earned the reputation points to include more than 2 links in my response, so I'm saving those for the ones that matter below).
If you update to the latest CTP 2.0 for Multi-Device Hybrid Apps, you will pick up the fix.
Unfortunately, there is an other Cordova issue that still exists in version 3.5 which also impacts WP8 in localized environments (https://issues.apache.org/jira/browse/CB-6932).
It has been fixed in Cordova version 3.6 which hasn't yet been released, but here's how you can pick up the fix.
After installing the new MDD tools, create an MDD project and build for WP8. (It will fail under Chinese as it did before.)
Now go into c:\Users\<username>\cordova\lib\wp\cordova\3.5.0\wp8\bin
Replace the existing create.js with the version from here
(click "Raw" to view just the file contents)
https://github.com/MSOpenTech/cordova-wp8/blob/ac097f2801d4defe5e4d445e10b7102001631a54/wp8/bin/create.js
Create a new project and build again for wp8. It should work now and future projects should work as well.
For me, it worked by removing android and adding again.
remove:
ionic platform rm android
add:
ionic platform add android
You can execute these commands at your project directory.

Phonegap 3.4.0 fails to build new projects and update old projects

I recently updated phonegap, node, and npm. I have an existing project I previously built with Phonegap version 3.3.0. I then attempted to update my existing project using phonegap platform update ios and received an error stating that the '/platforms' directory does not exist.
I don't think it makes any difference, but I also tried to use the cordova command instead of the phonegap command, but I just get the same error as above. I even created a completely new project with phonegap create Test and I am able to get a project built successfully, but when I try to run/build I get a similar error: Error: /platforms does not exist. Please specify an existing parent folder. [error] /Users/mftcmbp1/.cordova/lib/ios/cordova/3.4.0/bin/create: Command failed with exit code 1 Even stranger, I am able to successfully create a project with the cordova command, build ios and android platforms, and emulate the project, yet I can't do this with the phonegap command like I could before I updated.Any help or suggestions of why this would be occurring will be helpful.
Thanks!
Not sure if there is a bug with Phonegap 3.4.0, but I fixed my issue by uninstalling the latest Phonegap version and installing Phonegap version 3.3.0-0.19.4.
1- you need to 'cd' to your project and add platform first before build
cd Test
2- then add platform
iOS
phonegap platform add ios
android
phonegap platform add android
3- then you can build your project
iOS
phonegap build ios
android
phonegap build android
I ran into this over the weekend, have you tried:
$ mkdir project_directory/platforms
As I remember it, that solved the issue as a hotfix.
The error occured after a project was cloned from github without the platforms directory.
I ran into the same issue, and it looks like an error in the update script, and specifically this file:
node_modules/phonegap/node_modules/cordova/src/util.js
The quick fix is, in the function isRootDir, to change "config.xml" to ".cordova", i.e.:
- if (fs.existsSync(path.join(dir, 'config.xml'))) {
+ if (fs.existsSync(path.join(dir, '.cordova'))) {
The old version identified the base project directory via the existence of the .cordova directory. The new version is incorrectly looking for a directory that contains these three items:
www/
config.xml
platforms/
config.xml should not be in the base directory, it's under www/, which is why it fails.
The script does have fail-safe, which is to look for www/config.xml. However, the way it does this is to continue traversing the tree towards root, and if at any time it finds another www/config.xml, will assume this is a better candidate for the project directory.
In your situation, I'm guessing you have a /www/config.xml off of your root directory, and PhoneGap is erroneously thinking that is your project directory.

Xcode with phonegap provide build error

I have installed phonegap on MAC and installed Xcode 3.1. then open codex and create new project and built and ruis target might include its own product. build failed. give me a solution to this
Do you have a provisioning profile installed on the iPhone you are trying to run it on? For me it sounds you don't have the signing correctly.

Resources