4

I cloned a remote repository that has the platforms already, when I run the following I get 'android broken iOS broken'. What does this mean by broken and is there a fix other than removing the platforms and re-adding?

cordova platforms ls

1 Answer 1

0

The right thing is to remove, then re-add:

cordova platform rm ios
cordova platform rm android
cordova platform add ios
cordova platform add android
4
  • I have a Cordova app that builds fine for both ios and android but when I run the "Cordova platform ls" command it says both ios and android are broken. Is there truly no way to fix this other than the cordova platform rm/add commands? Apr 27, 2023 at 19:48
  • 1
    @Christopher That's right. Remove and Add is the right way, this also applies to Cordova plugins. There is no "synchronize" operation.
    – Byron
    Apr 27, 2023 at 22:57
  • Just following up here - it is possible that when I was getting the "android broken" platform ls I was in a Powershell terminal instead of a standard command prompt terminal. Just had a similar experience and when I closed the PS terminal and went into a command prompt terminal add platform rm/platform add I got the correct result (no more "broken" nonsense). Argh /headdesk. Jun 21, 2023 at 9:54
  • It happens. Glad I could help answer your question.
    – Byron
    Jun 23, 2023 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.