Showing posts with label Android Development. Show all posts
Showing posts with label Android Development. Show all posts

Wednesday, January 23, 2019

Could not start Gradle Daemon android build error in Cordova


This was the most confusing error I got when I was building  and release the app for Android Store. 

My android build configurations are listed bellow.

1. Tool Set - Cordova 6.3.1 using visual studio 2017
2. Target API level - 28
3. cordova-android @7.0.0


So the error message clearly gives the idea that Gradle deamon  cannot start to complete the android build. 

** First make sure you have installed and updated all the components for android SDK.


1. Lets check if you have installed Gradle, and it up and running. Open command prompt and enter the command 'gradle'.  If you getting the un-recognised command error move to the step 2.


2. Delete all existing installations of gradle.

3. Download gradle latest version from  https://gradle.org/releases/  

4. Copy the content to a folder in your C:\ drive.


5. Add gradle location to system variable 'path'.



6. Restart the computer and enter the command 'gradle' in command prompt.








Thursday, July 12, 2018

Android app missing permissions after publishing - Cordova, Visual Studio 2017


Hi All

All you have to do is update your android manifest file with required permission before create the release APK.

** You have to do it before every release if you cleaned the project.

 android:name="android.permission.CAMERA" />
 android:name="android.permission.FLASHLIGHT" />
 android:name="android.permission.ACCESS_NETWORK_STATE" />
 android:name="android.permission.INTERNET" />
 android:name="android.permission.READ_PHONE_STATE" />

Thursday, June 21, 2018

Cordova Gradle wrapper missing in android SDK


When you develop apps with Cordova and Microsoft Visual Studio there are some important facts you should know. I learned these things over 2.5 years of period.

1. Visual Studio tools for apache cordova is Microsoft product  and it's not updated alongside with other tools using by app developers.




So lets focus on this graddle issue. The latest android version released in 2018 is android 8.0 and 8.1 Oreo . But unfortunately microsoft tools for apache cordova is still supporting Android 7.1 - Nougat.

So in case you have updated your android  SDK and tools you might need to rollback that update to use Microsoft tools to build and release your app to Google Play. 

But again try to  keep Visual Studio for development tasks and always try to native tool set for release purposes. 

    

Sunday, November 5, 2017

Apache cordova scroll bar lagging on Android and iOS devices


When its come to developing hybrid mobile applications, Apache Cordova is amazing free  development tool which is supported by most popular IDE's like Microsoft Visual Studio. For more details about the Microsoft Visual Studio tools for apache cordova  please follow the link bellow.

https://www.visualstudio.com/vs/cordova/


In this article I assume that the reader is a cordova developer, and I'm not going to teach you  the basics for that there are millions of articles  you can find in web.

So if you are using jQuery, jQuery UI and row java scripts with apache cordova it's still ok if you developing some demo project or a pretty simple app.

But for  a commercial level project you must use Angular JS or higher angular version ( IONIC Framework - Extended version of cordova ) to get better user experience.

I have no offence towards to jQuery and jQuery UI as they are still great tools. But when it's come to hybrid application development Angular perform lot better than jQuery or jQuery UI.

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.