Unable to apply changes on device


When trying to run the tns run android command on the device that I have connected to my CPU, I get the following error:


Does any one know why is this error, and how can I go about fixing it. Thanks


See if app is runnng on background on the device and close it, if it will not solve problem try remove app from device and tns platform remove android and then tns run android


I believe you want me to check if the app that is running in the background is the app that I’m building for the device to project? Reviewing the device the app is not running and after running the tns platform remove android command, and running again the tns run android, it gives me the same error. Is there is other way to fix this problem?


did you unninstalled app from device? before tns run android again?


I very new to this, what will be the app that I need to uninstall?


app that are you trying to run with nativescript


It was never upload on the device, the only app that I uninstall was the one a ran on Android Studio. It gives me the same error, that Unable to apply changes on device: . Error is: Command npm.cmd install babylon@^6.4.5 --save --save-dev --save-exact --silent failed with exit code 1.


when you connecting the device to pc are you selecting use usb to: Use device as MIDI ?
if yes and still have same error, i don’t know what the problem is


On the pc it doesn’t give me that option nor on the cell. Forgive my ignorance but do you help me out to know how to get the option Use device as MIDI please.


when you connecting the android to the pc there appearing some options in phone, charge device, transfer files and use device as MIDI, but i think you have problem with npm backages


This is what I have when ran tns doctor

Do you think that is the problem?


try to install core modules, npm install tns-core-modules@latest --save


Sorry, I install the tns-core-module and still the same error. As you can see that the device that I’m trying to run it’s status is connected on the following picture;


I don’t understand why it doesn’t run with out a problem?


Thank you @Giorgius, got it resolved.


deleting the contents of the node_module/.bin folder and running android again fixed it for me.

rm -rf node_modules/.bin/*
tns run android