Issue: When deleted android platform then add it again


#1

so Im using the new beta version and also updated my npm global ionic tools.

I add the android platform and for some reason deleted it.
When i attempted to add it again using the command line tool, its not adding a build path
specifically:

org.apache.cordova.device

which holds Device.java

Currently, I’m manually copy and pasting the org folder into the src directory.
This works but obviously is not a preferred solution

Is anyone having this issue?
If so, is there a solution of possible fix?


#2

Same thing happens to me, I have also deleted and recreated the android platform.
I would be very interested in a fix.


#3

Can you try just doing:

cordova platform add android


#4
  1. ionic platform rm android
  2. ionic platform add android

Works for me :wink:


#5

To me it says:
Platform “rm” not recognized as a core cordova platform. See “platform list”.


#6
  1. ionic platform remove ios
  2. ionic platform add ios

#7

Thanks @danicomas, removing and adding back helped remove that error.


#8
  1. ionic platform rm ios

  2. ionic platform add ios

  3. ionic platform rm android

  4. ionic platform add android


#9

For Solving the above error, first type this,

  1. ionic platform remove ios
    then,
  2. ionic platform add ios

This will help you!