5

I have an error I have a when running tns platform add android command.

I can run other apps (new apps) but no my current and all happens after I install codeworks_android it change the path for the SDK then I reinstall native-script but I'm not able to add the Android platform.

CODEWORKS

error ENOENT: no such file or directory, scandir 'PATH_PORJECT\platforms\android\app\src\main\res'

double-beep
  • 5,031
  • 17
  • 33
  • 41
Cesar Vega
  • 455
  • 6
  • 15

2 Answers2

4

Adding the platform would help (For both Android and iOS),

tns platform add ios
tns platform add android

More explanation in Doc here

If the platform already exists(you can check inside the platforms folder), you can try remove/clean before adding again,

tns platform remove android
tns platform clean android

If you are using the Nativescript seed project (like NS advanced seed), make sure you are in mobile app's root folder(typically nativesctript inside the projects root folder) when you add or remove the platforms.

Adding the solution as an answer here with little more information (instead of an update in the comment) so others can get it easily.

onewaveadrian
  • 434
  • 1
  • 6
  • 17
Anand
  • 9,672
  • 4
  • 55
  • 75
-2

These commands solved my problem

npm i

ns run android