Error when building, incorrect environment for android


So I keep getting this error where it keeps telling me I have the incorrect environment to build android after installing the android sdk using android studio. After searching I had found that it’s related to an update google made that changed their file structure and I had found a work around. My question is is there a permanent fix so I can update the sdk without having to “fix” it after every update.


@klaisx Do you use Ionic 2 or 3? I updated to the latest Android studio and drivers, jdk, 2 weeks ago (Windows 7), and no issue, it’s just the emulator doesn’t work (I use Ionic 2 in development).

Hope it give you hints,


I’m using ionic 2.2 with Windows 10. I get the same error on my desktop and my laptop. Both win 10. Building is the only time I would get the error, if I serve or upload to ionic view it works just fine.


@klaisx just search like you did a fix for w10, for example this week i couldn’t upload to ionic view unless i found and read a fix, which was simply to change version in my project directory / ionic.json.file :slight_smile:

For your incorrect environment it’s simple, you have wrong path in windows (whatever version) in windows path files. In every windows you search for “ENVIRONMENT VARIABLES” and you should see something with node js, if not nmp is not well setup first, and second ionic will only generate bugs.