Sunday, November 20, 2016

The command "platforms\android\cordova\clean.bat" exited with code 2. - Visual Studio 2015 - Cordova Apps


I had to deal with this error for months and finally I came up with some sort findings about the root of this error. In my experience there are few possible cases.

If you see this error on your visual studio errors window this is the check list to follow.

Case 1 : Temporary caching  issues in visual studio.

  1. Try to right click the project and rebuild. 
  2. If you cant rebuild the project restart visual studio. Then try again.
  3. If your project is building successfully that means its a temporary caching  problem.

Case 2 : System variables of visual studio not up to date.
  1. Go to tools >> options >>> Tools For Apache Cordova >>> Environment Variable Overrides .
  2. Check all the paths  for your environment variables are correct. If not please apply the correct path.
  3. And try to rebuild the project.

Case 3 : Android SDK is not up to-date.


  1. First delete the andoird folder in platforms folder. 
  2. Try to build your project.
  3. Now you will see more details about the error.
  4. So install or update any component of sdk that has any errors in visual studio error window.


Follow these steps by the above order. That will save you lot of time. 

Tuesday, November 15, 2016

Visual Studio 2015 Cordova Remotebuild failed Error: 65

After thing for moths I came up with a radical solution for this problem. When you are trying to build and deploy your cordova app on apple devices you are communicating through lot of third party tools and interfaces. All I did was I reduce number of layers that I'm communicating to deploy on a apple device.

I'm not going to describe basics of cordova , mac and vs 2015  as I assume you already have better knowledge of   these three environment.

1. Install xcode latest version on your mac.
2. Install apache cordova on your mac. You can find more details from apache cordova documentation.

https://cordova.apache.org/docs/en/latest/guide/platforms/osx/ 

3. Add platform ios for your project.
4. Add all requires plugin to your project.
5. Build your project for iOS.


This is a sample script I used for creating a cordova project on mac.


echo "CREATING CORDOVA PROJECT";
echo " ******** ";
echo "";

cd PATH;
cordova create ProjectName NameSpace ProjectTitile;
cd pericorp;
cordova platform add ios;
cordova build ios;


echo "INSTALLING REQUIRED PLUGINS";
echo " ******** ";
echo "";


cordova plugin add cordova-plugin-camera;
cordova plugin add cordova-plugin-compat;
cordova plugin add cordova-plugin-device;
cordova plugin add cordova-plugin-dialogs;
cordova plugin add cordova-plugin-file;
cordova plugin add cordova-plugin-file-transfer;
cordova plugin add cordova-plugin-geolocation;
cordova plugin add cordova-plugin-network-information;
cordova plugin add cordova-plugin-whitelist;
cordova plugin add cordova-sqlite-legacy;


echo "INSTALLED PLUGINS";
echo " ******** ";
echo "";


cordova plugin ls;

echo "Cordova Project Created!";
echo " ******** ";
echo "";


6. Now this will create an xcode project in /Platforms/ios/ folder.
7. Now you can build and deploy this as a normal xcode project.
8. All you have to do is replace content of your www folder and  build the project for iOS.


Notes
* Close xcode before building the project from the terminal.
* Never touch the www inside the platform folder it will be creating automatically when you building the cordova project.


If you have any questions please comment bellow. I'm happy to help if I can.










Thursday, October 20, 2016

An error occurred uploading to the build server Error: Hostname/IP doesn't match certificate's altnames

I had this error when I was trying to debug my cordova application on a Remote Mac. There were many solutions in stakoverflow and other forums. But in my case mistake was for some reason host name of my Mac book pro was changed.


Previous : my-mac.local


Now : my-mac


So I changed the host name on my remote agent configuration window. This worked for me. So if you see above error message please check your mac's host name.

Tuesday, October 18, 2016

Convert PDF to word without using third party tools


Hi All

Follow tease step to convert  a pdf file ( Password protected or not )  to a editable word file. I used word 2016.

1. Try to open your pdf file from word. ( If the file is password protected you will be asked to provide the password ).

2. Once the file opened from word make file editable.

3. Now save the file as word file. After that you will be able to convert this file to Excel, txt etc.

 





Sunday, October 9, 2016

Visual Studio Cordova Command failed with exit code 69 ( Cordova tools for Visual Studio 2015 )

In my case I update xCode recently. So I had to open xcode and agreed to new licence agreement. After that I was able to debug on iOS.


Monday, September 19, 2016

SSMS Does not display properly in high DPI

If you are using sql 2012 or higher download the latest version of SQL Server Management Studio from Microsoft web site. Its is free.

https://msdn.microsoft.com/en-us/library/mt238290.aspx

Tuesday, August 2, 2016

Could not resolve host yourmac.local

I had this  issue when using remotebuild tools for mac with visual studio 2015 cordova app. When working on this there was few thinks I missed.

1. Your mac's host name contains special characters  ( i.e. I had my mac book pro's name as  roger's macbook ) .

2. Check your windows firewall.

3. If both of above options failed try to use ip address instead of host name.



Monday, July 11, 2016

Android Support Repository missing

I could not find the Android Support Repository in my android sdk manager. I could not build my cordova project as well. Finally found the above item renamed in my android sdk manager and I was able to build my project successfully.





Monday, June 13, 2016

Unable to get property 'copyAsync' of undefined or null reference. Cordova

When I was developing hybrid application using cordova and visual studio this err occurred  in all windows based laptops and personal computer. When you taking a photo from the app it's stopping with following error message.

 
Unable to get property 'copyAsync' of undefined or null reference.


Solution

Just uninstall the cordova-plugin-camera using configuration section and install it again.


Thursday, June 9, 2016

Remove password from a pdf file without using install 3rd party software



1. Email your PDF to your gmail address.
2. Open the PDF file in the browser ( Chrome is the best browser for this ).
3. Open PDF file using the password.
4. Hit on PRINT button.




5. Change the printer destination to save as a pdf.



6. Save the new pdf  and you got the new pdf file without a lock.













Thursday, April 28, 2016

How to fix root element is missing when doing a visual studio build or publish

This was easy to fix than I thought.  All I did was clear the website cache folder.

DRIVE LETTER OF OS:\Users\USER NAME\AppData\Local\Microsoft\WebsiteCache

example

C:\Users\Jack\AppData\Local\Microsoft\WebsiteCache

Thursday, March 31, 2016

Windows cannot be installed to this disk. ( Windows 8.1, 7 - Controller Issue )

This may not be solution for every one. But it did work for me. All you have to do is go to BIOS and set boot option to LEGACY from UEFI.