Posts

Showing posts from August, 2020

keytool is not recognized as an internal or external command, operable program or batch file.

Image
 I f it is your first time learning to build android project, you may find an issue when try to generate a private key. This message   keytool is not recognized as an internal or external command, operable program or batch file.   may occur if the path of your java sdk has not been set globally. There are two options you can do, the first easy option is by set the path of sdk java globally so you can run any executable file from the bin java folder. Click the window button and type in  Environment Variables  in the search program field bar. A popup window will appear, there will be a button called  Environment Variables . Click this button and look for the Path value in the System variables panel and then click the edit button. Enter your java sdk location at the end of the path value. Once you add this you should be able to use the keyword keytool.exe. For example the path of java SDK install can be like this. C : \Program Files \Java\jdk1 . 7.0 _79\b in T...

(gradle-2.13-all)-Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 403 for URL: http://services.gradle.org/distributions/gradle-2.13-all.zip

  Answer: There are some simple steps to fix the error. 1)  find and open  platforms\android\cordova\lib\builders\GradleBuilder.js  file with text editor. Find the line var distributionUrl = process . env [ 'CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL' ] || 'http\\://services.gradle.org/distributions/gradle-2.13-all.zip' ; then change  http  to  https  in this line as follows: var distributionUrl = process . env [ 'CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL' ] || 'https\\://services.gradle.org/distributions/gradle-2.13-all.zip' ; then save the file. 2)  Check installed jdk versions and install  jdk 1.8  if not installed. Then if the  JAVA_HOME  environment variable is anything but  1.8  open  tools->options->Tools for Apache Cordova->Environment Variable Overrides  in Visual Studio, check the  JAVA_HOME  checkbox and select the java 1.8 folder like follows: C:\Program Files\Java\jdk1...