I am having problems in adding android platform to my cordova project. All things that are required have been installed. I have jdk,sdk for android, npm, git and cordova. All have latest version as of 06/14/2017. I am able to create cordova project with the command cordova create myapp.
But after the app is successfully created and when I run cordova platform add android from within the myapp folder I get an error. I have tried everything but could not get it done. I have already set ANDROID_HOME, added Android SDK tools and platform-tools directories to PATH, used --nofetch but to no avail.
Below is the command prompt error message after I run my command cordova platform add android
Using cordova-fetch for cordova-android@~6.2.2
Error: Failed to fetch platform cordova-android@~6.2.2
Probably this is either a connection problem, or platform spec is incorrect. Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1
Error output: npm ERR! shasum check failed for
C:\Users\PARAS~1.SHA\AppData\Local\Temp\npm-3048-83f48a6f\registry.npmjs.org\cordova-android\-\cordova-android-6.2.3.tgz
npm ERR! Expected: 249f21b6ce5f1f1c847a7ab83b16909dbed5aa28
npm ERR! Actual: ace33a120d0172a175c73e708f0552cc205731b0
npm ERR! From: http://registry.npmjs.org/cordova-android/-/cordova-android-6.2.3.tgz
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\paras.sharma\AppData\Roaming\npm-cache\_logs\2017-06-14T11_09_17_075Z-debug.log