Build doesn’t produce apk - visual-studio-2013

I’m using Visual Studio Tools for Apache Cordova CTP3.1 on VS 2013. Building a simple Blank App template for Android. Build succeeds with no errors, but I can’t find compiled APK file anywhere! bin\Android\ folder contains empty Release and Debug folders. Below is my output from VS build. I don’t see the actual call to Cordova to do the Android build, should it be there? Ripple emulator works just fine.
Thank you.
Build output:
1>------ Build started: Project: BlankCordovaApp1, Configuration: Release Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> GeneratedJavascript=
1> C:\Users\XXX\Documents\Visual Studio 2013\Projects\BlankCordovaApp1>call "C:\Program Files\nodejs\"\nodevars.bat
1> Your environment has been set up for using Node.js 0.12.0 (x64) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\DUZVVBQ3.2O1\packages\vs-mda
1> ------ Name from source package.json: vs-mda
1> ------ Version from source package.json: 0.1.75
1> ------ Current globally installed version: 0.1.75
1> ------ Package already installed globally at correct version.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

To create apk, you need to select target as Device or Emulator. Apk is not created for Ripple because no package deployment is required, it is just launching the index.html in browser.

Related

Run CMake Install target with incredibuild

I am trying to use incredibuild to speed up the compilation of a cmake project in command line, compiling with Visual Studio 2013.
I am able to compile and install the libraries by using the command:
BuildConsole zlib.sln /prj=INSTALL /cfg="Debug|x64"
But it skips the install part:
Microsoft Visual Studio 2013 Version 12.0.40629.0.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
1>Project not selected to build for this solution configuration
However, if I execute it from Visual Studio, it works fine:
Initializing...
Microsoft Visual Studio 2013 Version 12.0.40629.0.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: INSTALL, Configuration: Debug x64 ------
1>Build started 1/6/2016 4:52:09 PM.
1>PrepareForBuild:
1> Creating directory "x64\Debug\INSTALL\INSTALL.tlog\".
1>InitializeBuildStatus:
1> Creating "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
1>PostBuildEvent:
1> -- Install configuration: "Debug"
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/lib/zlibd.lib
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/bin/zlibd.dll
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/lib/zlibstaticd.lib
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/include/zconf.h
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/include/zlib.h
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/share/man/man3/zlib.3
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/share/pkgconfig/zlib.pc
1> ...
1>
1>FinalizeBuildStatus:
1> Deleting file "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild".
1> Touching "x64\Debug\INSTALL\INSTALL.tlog\INSTALL.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.40
========== Build: 1 succeeded, 0 failed, 6 up-to-date, 0 skipped ==========
Any clue ?
Thanks !
Emmanuel
This reply is from the IncrediBuild team:
We have downloaded and tried the same build of zlib-1.2.8 with Microsoft Visual Studio 2013 in our lab.
We've found out that by default in zlib, when using cmake to generate the .sln and .vcxproj files, the generated INSTALL project was NOT included in the build configuration "Debug|x64".
When building the generated zlib.sln for "Debug|x64", it does not build the INSTALL project, not via VS IDE and neither via the BuildConsole command - which is fine, since the project was not included in the build configuration.
Once the INSTALL project is marked as selected to build in the "Debug|x64"
configuration, there is no issue of it being skipped and the project is built correctly.
Either choosing to explicitly build this project for "Debug|x64" or fixing the zlib cmake to include this project to be built in "Debug|x64" fixes the issue.
Disclaimer: the writer is an IncrediBuild employee
The solution that works for me is first run MSBuild on the solution, then on the Install.vcxproj individually. This is completely unrelated to IncrediBuild though, I'm using just plain MSBuild. I suppose IncrediBuild can be used on the solution, then MSBuild on the Install project.
Actually, in my case (without IncrediBuild) just running MSBuild on the Install.vcxproj is enough, it detects the dependencies and builds the other projects before the Install project.

Unable to build Visual Studio 2015 Preview Codova Project in Release Mode - Getting Error - Command failed with exit code 8

I am using Visual 2015 Preview with Cordova Tools, am able to build, deploy application to device or VS Android Emulator without any issues in debug mode. Trouble I am having is when I do it release mode, whenever I am trying to build application in release mode I get below error
AppPath...\bld\Release\platforms\android\cordova\build.bat: Command failed with exit code 8 mode
In debug mode it works perfectly fine.
I have all environment variables set as follows as well
ADT_HOME - C:\Program Files (x86)\Android\android-sdk
ANT_HOME - C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3
JAVA_HOME - C:\Program Files (x86)\Java\jdk1.7.0_55
Path variable has been appended with %JAVA_HOME%\bin;%ADT_HOME%\tools;%ADT_HOME%\platform-tools;%ANT_HOME%\bin;
All these installation are part of default visual studio installation, except setting up environment variables.
Please let me know what needs to be done to resolve this in release mode.
I have already published my app in app store using VS 2015 preview with Cordova tools, I had to rebuilt my Developer machine/laptop and that's when all this trouble started. I need to publish an update to my app over this weekend but I am stuck now.
Below is Build Output for release mode
1>------ Build started: Project: PackagedInterviewApp, Configuration: Release Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(96,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> GeneratedJavascript=
1> C:\TFS Application Path....>call "C:\Program Files (x86)\nodejs\"\nodevars.bat `enter code here`
1> Your environment has been set up for using Node.js 0.10.33 (ia32) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nxqc2vi5.kqy\packages\vs-mda
1>MDAVSCLI : error : C:\TFS Application Path....\bld\Release\platforms\android\cordova\build.bat: Command failed with exit code 8
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Below is Build Output for Debug mode targeted to device or VS Android Emulator
1>------ Build started: Project: PackagedInterviewApp, Configuration: Debug Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(96,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> GeneratedJavascript=
1> C:\TFS App Path...>call "C:\Program Files (x86)\nodejs\"\nodevars.bat
1> Your environment has been set up for using Node.js 0.10.33 (ia32) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\nxqc2vi5.kqy\packages\vs-mda
2>------ Deploy started: Project: PackagedInterviewApp, Configuration: Debug Android ------
2>Starting launch process C:\Program Files (x86)\nodejs\node.exe ""C:\Users\....\AppData\Roaming\npm\node_modules\vs-mda\emulator.js"" --platform android --path "C:\TFS App Path...\bld\Debug" --deployTarget "target=169.254.220.177:5555" --language en-US --configuration debug
2> Generating config.xml from defaults for platform "android"
2> Calling plugman.prepare for platform "android"
2> Preparing android project
2> Processing configuration changes for plugins.
2> Iterating over installed plugins: []
2> Writing out cordova_plugins.js...
2> Wrote out Android application name to "Demo App"
2> This app does not have launcher icons defined
2> Wrote out Android package name to "io.cordova.myapp5fd4c4873c4d44e3a8d208242fbad585"
2> Running command: C:\TFS App Path...\bld\Debug\platforms\android\cordova\run.bat --nobuild --target=169.254.220.177:5555 --debug
2> Skipping build...
2> Built the following apk(s):
2> C:\TFS App Path...\bld\Debug\platforms\android\ant-build\CordovaApp-debug.apk
2> Using apk: C:\TFS App Path...\bld\Debug\platforms\android\ant-build\CordovaApp-debug.apk
2> Installing app on device...
2> Launching application...
2> LAUNCH SUCCESS
2> Command finished with error code 0: C:\TFS App Path...\bld\Debug\platforms\android\cordova\run.bat --nobuild,--target=169.254.220.177:5555,--debug
2>
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
Turn Out to be very Minor Issue, I had migrated to new Dev Environment, I had ant.properties file which had this key == > key.store which points to the file path associated with key store, there was small typo in the path when I had changed it based on the new environment.
VS Studio shows above error, I had to increase the Build verbosity to diagnostic to show me the detail error, once I enabled the build log verbosity to diagnostic I was able to see the detail error.
U can increase verbosity over here
Tools > Options... > Projects and Solutions > Build and run
try this delete this directory
\bld\Release\platforms
For mine, it was the fact that I changed the ID from io.cordova.test to a single name, i.e. bob. I needed to change it to the format com.company.appname. As soon as I did that it worked.
I must credit #Amol Gote with his comment on enabling detailed build comments, without which I would not have seen this.

Why do I get errors when building a hybrid app

When I'm trying to build and deploy a new hybrid app template (with no changes done) build fails and I receive this output:
1>------ Rebuild All started: Project: BlankCordovaApp2, Configuration: Debug Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> GeneratedJavascript=
1> C:\Users\YA\documents\visual studio 2013\Projects\BlankCordovaApp2\BlankCordovaApp2>call "C:\Program Files (x86)\nodejs\"\nodevars.bat
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : "MySQL" �� ���� ����७��� ��� ���譥�
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : "MySQL" �� ���� ����७��� ��� ���譥�
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.
1> Your environment has been set up for using Node.js 0.10.33 (ia32) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\SLSJAGN5.MZC\packages\vs-mda
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Maybe errors text is in Russian, but I can't figure out how to change encoding in Output Window. I'm using Russian Windows 7, but VS (2013 Community) was intentionally set up in English without any language pack. Never had any problems with Russian text in Output before on other PCs. Also, I've checked all environment variables mentioned in some other topics related to Cordova, they seems to be OK.
Any suggestions how to track and solve this?
EDIT: As initial system isn't available for now, I've tried it on my home system. I'm receiving another output but with the same result - build fails:
1>------ Rebuild All started: Project: BlankCordovaApp4, Configuration: Debug Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> GeneratedJavascript=
1> d:\mydocuments\visual studio 2013\Projects\BlankCordovaApp4\BlankCordovaApp4>call "C:\Program Files (x86)\nodejs\"\nodevars.bat
1> Your environment has been set up for using Node.js 0.10.26 (ia32) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\0N5RFQMM.AHA\packages\vs-mda
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
System is Windows 7 x64 HP. I've checked there was no failed dependency report. Still no result. I've tried to follow this Unable to build Cordova project in Visual Studio, but no luck also. And no errors in Error List window.
sighs
Suggestions, pleeease?
I've solved by removing doing what is said here: 'MySQL' is not recognized as an internal command (Apache Cordova for visual studio) and also removing C:\Users\Miquel\AppData\Roaming\npm\node_modules\vs-mda\node_modules\*.* and C:\Users\Miquel\AppData\Roaming\npm-cache\*.*
Then in cmd I went to C:\Users\Miquel\AppData\Roaming\npm\node_modules\vs-mda and ran:
npm install

\npm\node_modules\vs-mda\vs-cli is not recognized as an internal or external command

Installed the Hybrid-App CTP. Downloaded the Backbone sample. Set my build to Windows phone and Emulator 720 P and tried to build. I get this error:
1>------ Build started: Project: BackboneTodo, Configuration: Debug Windows Phone ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(90,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> Your environment has been set up for using Node.js 0.10.29 (x64) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\n4ltjwgz.cbl\packages\vs-mda
1> '"C:\Users\<me>\AppData\Roaming\npm\node_modules\vs-mda\vs-cli"' is not recognized as an internal or external command,
1> operable program or batch file.
1>C:\Users\<me>\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets(68,5): error MSB3073: The command ""C:\Users\<me>\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" build --platform "Windows Phone" --configuration "Debug" --projectDir . --projectName "BackboneTodo" --buildServerUrl "" --buildTarget "PhoneEmulator720P"" exited with code 9009.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The vs-cli does not exist in my \npm\node_modules\vs-mda directory. I tried to repair the CTP install with no luck.
Any other ideas on how to get this installed correctly?
It seems you Node installation was old, or corrupted. Try these steps:
1) Remove the CTP (this may take a while)
2) Remove node.js
3) Delete users\name\appdata\roaming\npm and users\name\appdata\roaming\npm-cache
4) Delete users\appdata.cordova
5) Re-install CTP
6) Open a sample application and build
It re-installs npm at this point and the vs-cli.cmd is there. In my case does not have spaces, and I did have those SDK's installed.
I've solved by removing C:\Users\Miquel\AppData\Roaming\npm\node_modules\vs-mda\node_modules\*.* and C:\Users\Miquel\AppData\Roaming\npm-cache\*.*
Then in cmd I went to C:\Users\Miquel\AppData\Roaming\npm\node_modules\vs-mda and ran:
npm install

Rebuild fails where Clean/Build succeeds in Visual Studio 2010

I've created two projects in a solution, a static library called vm and a console application called vmx. I use the new approach of Framework and References to create the dependency of vm for vmx. I also added x64 platforms to both projects.
Now, when I select Rebuild Solution, I get this output:
1>------ Rebuild All started: Project: vm, Configuration: Debug Win32 ------
1> vm.c
1> vm.vcxproj -> D:\Shared\Dynos\Build\Visual Studio 2010\Solutions\..\..\..\Lib\Win32\Debug\vm.lib
2>------ Rebuild All started: Project: vmx, Configuration: Debug Win32 ------
2> main.c
2>LINK : fatal error LNK1104: cannot open file 'D:\Shared\Dynos\Lib\Win32\Debug\vm.lib'
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
It as if vm.lib is deleted after being built before vmx is compiled.
If I select Clean Solution, then Build Solution, I get this output:
1>------ Build started: Project: vm, Configuration: Debug Win32 ------
1> vm.c
1> vm.vcxproj -> D:\Shared\Dynos\Build\Visual Studio 2010\Solutions\..\..\..\Lib\Win32\Debug\vm.lib
2>------ Build started: Project: vmx, Configuration: Debug Win32 ------
2> main.c
2> vmx.vcxproj -> D:\Shared\Dynos\Build\Visual Studio 2010\Solutions\..\..\..\Lib\Win32\Debug\vmx.exe
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Everything is OK.
Could someone explain to me what is happening here?
Thanks
I ran into this problem recently as well, and after much head banging, I realized that the output directory was the same on several of the projects. So project A would get rebuilt fine, however when project B was "rebuilt" it would clean out the output directory including projectA's .lib and .dll files, and subsequent project rebuilds would fail.
Our fix for the moment for our auto build was to do a clean, then a build on the solution, instead of doing rebuild or clean/rebuild. Obviously the alternative would be to change the projects to each have their own output directory.
Hope that helps someone!
I found the solution to my problem. The solution is to not to use the Frameworks and References feature in project settings and JUST use the old Project Dependencies system. I removed my reference and clicked the checkbox in the Project Dependencies dialog box and it all works now. Weird!
I huess Frameworks and References is just for C# projects and should be avoided for C++ ones.
For me it was the intermediate directory that has been cleaned before the next project got built. This was really confusing, as I didn't knew what exactly will be separated into that directory and my solution and project files are all in the directory.
If you have the solution file *.sln and the referenced project files *.vcxproj all in one directory, then add $(TargetName)\ to the value of Project Properties > Configuration Properties > General > Intermediate Directory or replace it with $(Configuration)\Int\$(ProjectName)\.
This is needed for me, as I use the project in other solutions, too.
I have encountered similar problems. Certain versions of Visual Studio have this problem (see reference). I was using Visual Studio Community 2022 (64-bit) Version 17.2.6, and switched to different versions (Microsoft Visual Studio Community 2019 Version 16.11.18 and Microsoft Visual Studio Community 2022 RC (64-bit) Version 17.0.0 RC2), which fixed the problem.
1)Might be some dependency issue
OR
2)Some old intermediate files might be remaining during rebuild which
get deleted during clean & are replaced by new, correct ones during fresh build.

Resources