Cordova Windows Project Setup - windows

I have created a new cordova windows application (not WP8) using CLI.
I followed the following procedure,
cordova create xyz com.compname.wxyz XYZ<br>
cd xyz<br>
cordova platform add windows<br>
cordova plugin add blah! blah! blah!<br>
cordova build windows<br>
cordova run windows<br>
When i run the above codes in command promp everything runs fine until "cordova build windows", but when i run "cordova run windows" it shows a lot of errors,
Error: Could not install the package.<br>
Starting application...<br>
Get-AppxPackage : The package repository is corrupted.<br>
The package repository is corrupted.<br>
when i try to run the project it says error log as,
Error 1 Error : DEP0600 : The following unexpected error occurred during deployment: <br>
The package repository is corrupted.<br>
The package repository is corrupted. CordovaApp.Windows80<br>
Does anyone have any idea what is going on or can someone tell me how to successfully create a new cordova windows project using CLI or manually.
Thank you.

I'm assuming you have Microsoft Visual Studio installed and you're running on a Windows 8 system?
What happens when you open the solution in Visual Studio?

I guess this is because your deployment environment you targeting is not being recognized by the deploying platform you are using.
in short your device in which you want to deploy the appxBundle is not being identified by your computer.
I hope this helps...
Tell me you want to deploy it on windows which OS version.
1) windows 10 [ARM/x86]
2) windows 8.1 [ARM/x86]
Let me know if it helps.

Related

Hybrid mobile app throws "Command failed with exit code 1" in Visual Studio 2015 in regards to Cordova for a remote build

Recently I upgraded my components (Cordova, node.js, Ionic, etc.) on my Windows 10 computer and on my Mac in order to be (more or less) up-to-date.
Using Visual Studio 2015 I am developing a hybrid mobile app, which can be built when it comes to Android.
However when I start remotebuild --secure false on my Mac and try deploying the files from my Windows PC it finally fails with the following errors:
Severity Code Description Project File Line Suppression State
Error /Users/joey/.cordova/lib/npm_cache/cordova-ios/4.5.3/package/bin/create Command failed with exit code 1 MY-NICE-APP V4 C:\_develop\MY-NICE-APP_V4\MDAVSCLI 1
Severity Code Description Project File Line Suppression State
Error Error: Remote build error from the build server Build failed with error /Users/joey/.cordova/lib/npm_cache/cordova-ios/4.5.3/package/bin/create: Command failed with exit code 1 - MY-NICE-APP V4 1
The following has to be mentioned as well:
Prior to the upgrade all went well.
The way I deploy in Visual Studio is either 'Release - iOS - Remote Device' or 'Release - iOS - Simulator iPhone 5'. The error is the same.
When deploying to Ripple locally all works well.
On Mac I can see the commands GET /cordova/build/tasks/21740 200 5.020 ms - 689 or similiar, which proves that the connection between Mac and PC works.
In the target folder '/Users/joey/.taco_home/remote_builds/21740/cordovaApp' I see all files/folders, which have to be there. However the most important folder '(...)/cordovaApp/platforms' is empty.
I suspect a problem on my Mac in regards to Cordova, but am helpless what in detail.
Here are some config details regarding my Mac:
node.js: 0.12.9
npm: 2.14.9
cordova: 6.5.0
ios-sim: 6.1.2
ionic: 2.2.1
Note that above Cordova shows something with 4.5.3, even I have a newer version running (6.5.0)...
Having spent hours of debugging I fixed the issue by updating node.js, npm and remotebuild on my Mac. However I ran into a different problem, which I will describe in another thread.

STRIPPRIVATESYMBOLS : error : EC_FORMAT when building windows

I'm trying to build a project for windows using cordova build windows --arch="x86" and I got this error
STRIPPRIVATESYMBOLS : error : EC_FORMAT [D:\my-project\platforms\windows\CordovaApp.Windows.jsproj]
Everything is ok when I build Android version.
I'm using VS2015, node 4.3.1 and npm 5.0.4.
I also have VS2012 installed on my computer for other projects
Has anyone run into the same problem ? Please tell me if you need further information
Thank you

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.

cordova Hybrid APP build error with vs2013

I tried build blank cordova hybrid app with vs2013 , but got some error
(1) Cannot find module 'lru-cache'
(2) The command ""C:\Users\Ian\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" prepare --platform Android --configuration Debug --projectDir . --projectName "BlankCordovaApp2"" exited with code 8.
What's i missing?
Dev Tool : vs2013 up2 and install cordova perview
OS : win 8.1
Do you know if the project build was interrupted midway?
This looks like a node acquisition issue. If any of you run into this issue, could you run npm install lru-cache and let us know if that fixes it?
Thanks!
Avani

Build phonegap windows8 project using command line

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.

Resources