Search code examples
androidcordovaandroid-sdk-toolsfailed-installationandroid-install-apk

How to install Cordova Cli properly in 2020?


I've tried a lot of ways to install cordova on my windows 10 laptop. But it always shows some warning or the other. Looks like Cordova isn't installed properly in my laptop. How can I install it properly?


Solution

  • As a beginner, after many failed attempts to properly install cordova in 2020, I realized it's never gonna work using new and updated version of JDK and SDK (atleat not in my case). If some beginner is facing the same situation, I understand the problem. So, here is the solution. The most probable problem is with your JDK and SDK. The installed JAVA JDK and Adnroid SDK are not compatible. You may probably have downloaded the latest SDK release from developer.android.com. The problem is, it won't work with any version of JDK for some reason and you'll keep getting one error or the other. You need to install the SDK using the old manner through the installer that developer.android.com used to have instead of the recent zip folder. You can get that SDK installer from here: https://dl.google.com/android/installer_r24.4.1-windows.exe . Second thing is to install JDK 8u.... No other JDK would be helpful (atleast not in my case). You can download it from oracle but you need an oracle account for that. Or download it from here: https://www.filehorse.com/download-java-development-kit-64/49906/download/ . These two are the most troublesome tools. Downloading and using above versions will solve major and most of your problems, if not all. Rest of the tools are Node.js, Gradle, Git, Apache Ant, they are easy to go with. Install them and you're good to go.

    Have a nice one!