I am using ionic to build mobile app. When I using the command: ionic cordova build android / ionic cordova platform add android it's appear following error. Please help me to fix it.
'AppMyCity> ionic cordova platform add android
cordova platform add android --save Using cordova-fetch for cordova-android@~7.0.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: io.ionic.starter
Name: MyCity
Activity: MainActivity
Android target: android-26
Subproject Path: CordovaLib Subproject Path: app Android project created with [email protected]
Android Studio project detected
Android Studio project detected
(node:70480) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token < in JSON at position 3 at JSON.parse () at getJson (C:\Users\anhde\AppData\Roaming\npm\node_modules\cordova-lib\src\plugman\util\metadata.js:29:31) at Object.exports.get_fetch_metadata (C:\Users\anhde\AppData\Roaming\npm\node_modules\cordova-lib\src\plugman\util\metadata.js:41:24) at C:\Users\anhde\AppData\Roaming\npm\node_modules\cordova-lib\src\cordova\platform\addHelper.js:343:48 at _fulfilled (C:\Users\anhde\AppData\Roaming\npm\node_modules\cordova-lib\node_modules\q\q.js:787:54) at self.promiseDispatch.done (C:\Users\anhde\AppData\Roaming\npm\node_modules\cordova-lib\node_modules\q\q.js:816:30) at Promise.promise.promiseDispatch (C:\Users\anhde\AppData\Roaming\npm\node_modules\cordova-lib\node_modules\q\q.js:749:13) at C:\Users\anhde\AppData\Roaming\npm\node_modules\cordova-lib\node_modules\q\q.js:810:14 at flush (C:\Users\anhde\AppData\Roaming\npm\node_modules\cordova-lib\node_modules\q\q.js:108:17) at _combinedTickCallback (internal/process/next_tick.js:131:7) (node:70480) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:70480) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code'