Installed platforms: android broken Ionic 3

Can someone please help me troubleshoot my ionic 3 project…something went wrong with my environment and now i cant build my ionic 3 project i get this error

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: E:\Java\Android\installation\Android\Sdk\tools\templates\gradle\wrapper

i have trying updating my SDK multiple time but no luck…

i have removed my android platform but every time i add it back i get an error…

when i run this command “ionic cordova platform list” i get this.

Installed platforms:
android broken
Available platforms:
amazon-fireos ~3.6.3 (deprecated)
blackberry10 ~3.8.0
browser ~4.1.0
firefoxos ~3.6.3
webos ~3.7.0
windows ~4.4.0
wp8 ~3.8.2 (deprecated)

is there a way i can set my environment back to the way it was…

Try to install gradle:

Hello, looks like your primary issue is about Java on Windows, try to reinstall it from
Then, you should be able to run the command again (and make sure Windows PATH variables are ok).

hi Suluuboi,
I have exactly the same problem, did you solved that?
I already try to upgrade-downgrade java sdk, android sdk, nothings works.

I am now with:
android sdk 25
java sdk 1.8

My ionic info:

cli packages: (C:\Users\fred\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 6.5.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android broken
    Ionic Framework    : ionic-angular 3.9.2


    Android SDK Tools : 26.1.1
    Node              : v8.9.4
    npm               : 4.6.1
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\fred\AppData\Local\Android\Sdk


    backend : pro

when I try to install android platform i have always the same issue.

Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: io.ionic.ternatsterker
        Name: ternatsterker
        Activity: MainActivity
        Android target: android-26
Subproject Path: CordovaLib
Android project created with cordova-android@6.4.0
Installing "cordova-plugin-camera" for android
Failed to install 'cordova-plugin-camera':Error: cmd: Command failed with exit code ENOENT
    at ChildProcess.whenDone (C:\Users\fred\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitOne (events.js:116:13)
    at ChildProcess.emit (events.js:211:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Error: cmd: Command failed with exit code ENOENT

my project work properly on local or via ionic view, but can’t add a platform.

It seems like there is a file or directory missing. I don’t know if the newest version of ionic supports cordova 6.5. Your npm is very old, too.

I recommend the following steps:

  1. Run
    npm list -g --depth=0
    and write down the list of globally installed modules.

  2. Run
    npm uninstall -g MODULE1 MODULE2 MODULE3 ...
    to remove all modules, that were listed through the previous command except for the npm module itself.

  3. Run
    npm i -g npm
    to upgrade your npm to the latest version.

  4. Install all previously uninstalled modules with
    npm i -g MODULE1 MODULE2 MODULE3 ...

  5. Delete the node_modules directory of your ionic project and also the package-lock.json file. Navigate with your command line to that project folder and run
    npm i
    to reinstall all dependencies for your project.

  6. Check if your android platform was correctly removed by running
    ionic cordova platform rm android
    and check if there is no android folder in your projects platform folder. Run
    ionic cordova platform add android
    to add the android platform to your project.