Edit:
There has been a newer release of Cordova Android that also fixes some problems with SDK tools 26.x.x
cordova platform update [email protected]
or
cordova platform rm android
cordova platform add [email protected]
Old answer
Google broke Cordova Android 6.1.x and some other frameworks with their latest sdk tools update.
Cordova Android 6.2.1 has been released and it's now compatible with latest Android SDK.
You can update your current incompatible android platform with cordova platform update [email protected]
Or you can remove the existing platform and add the new one (will delete any manual change you did inside yourProject/platforms/android/ folder)
cordova platform rm android
cordova platform add [email protected]
You have to specify the version because current CLI installs 6.1.x by default.
I resolved by this by replacing the tools
folder in my Android SDK with an older version of the SDK tools (r25.2.3
). Follow these steps to do the same:
r25.2.X
series (not r25.3.X
).tools
directory.$ANDROID_HOME
directory (~/Library/Android/sdk/
on OS X).tools
directory there to tools.bak
(e.g., mv tools tools.bak
)tools
directory you just downloaded into the SDK folder (e.g., mv ~/Downloads/tools/ .
)A new major version of the SDK tools was just released, which appears to be causing some issues with Ionic (see the press release here: http://tools.android.com/recent/androidsdktoolsrevision2530feb2017).
This worked for me
cordova platform update [email protected]
There's no need to downgrade Android Tools. On Windows gradle moved from:
C:\Users\you_username\AppData\Local\Android\sdk\tools
to:
C:\Program Files\Android\Android Studio\plugins\android\lib\templates\gradle\wrapper
So you just need to ajust your path so that it points to the right folder.
I had same problem and I solved it with Carlos Delgado's answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With