Unable to apply changes on device


#1

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

,
https://i.gyazo.com/7336e0f77b32a90f4945f3bdf95c43f9.png,

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


#2

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


#3

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?


#4

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


#5

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


#6

app that are you trying to run with nativescript


#7

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.


#8

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


#9

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.


#10

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


#11

This is what I have when ran tns doctor

Do you think that is the problem?


#12

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


#13

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?


#14

Thank you @Giorgius, got it resolved.


#15

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