This is what helped me: Adding specific android platform
What should be done is the following... In my case it was cordova but the same is relevant for ionic, phonegap and other frameworks like these:
- list all platforms installed for your project:
cordova platform list. You'll see something like this:
remove the android platform:
cordova platform remove android.then add the specific android platform:
cordova platform add android@5.0.0.
Good luck! :)
