Nativescript-cli: 'tns run android' does not sync after launch but shows 'Compilation complete'

Created on 14 Sep 2017  路  13Comments  路  Source: NativeScript/nativescript-cli

I was looking for open issues that deal with this problem but did not find anything. So I guess it's my configuration problem and I do not think it's reproducible easly.... anyway:

when I launch tns run android --watch the application starts normally, when I edit and save any file the console shows the following messages

12:59:33 - File change detected. Starting incremental compilation...

12:59:35 - Compilation complete. Watching for file changes.

but nothing happens to the application, and this happens to every change. To apply the changes to the emulator, I must restart the app.

My OS is windows 10 and the the problem occurs with any applications tested (also latest versions of SampleGroceries or lazyNinjas)

bug windows needs more info

Most helpful comment

I just did tns platform remove android && tns platform add android and now I can run tns run android --device <MYDEVICEID>

All 13 comments

Hi @pako8x,

--watch flag is no longer necessary to sync changes, run does that by default. We changed that a couple of releases ago. You can check the documentation for more info or just run tns run android --help to see what run does and what flags you can use with the latest CLI.

Hope this helps!

@pkoleva thanks for the fast reply but no, It is exactly the same....

@pako8x

Can you try by creating a brand new project and apply some changes while the command tns run android is executed. Also do let us know in which file you are making changes (CSS, HTML or TS).

@NickIliev
I understand what you want to do, but as I said it happens with any project, including SampleGroceries and other template projects, modifying everything inside them. By the way, I have a guest VM with MacOS that I use to compile and emulate iOS and it works perfectly with the same projects, previously changed and committed to github by the host machine that has this problem.

I do not think it's an application-level issue, but more likely at configuration level. Could it be a problem with the setup of Android or TNS?

If so, what would be the best practices for a clean installation of everything (removing old files)?

Thank you

The issue is reproducible on some Windows environment.
Reported via templates team
Steps to reproduce:

tns create MDF --template https://github.com/NativeScript/template-master-detail-ng 
tns run android
// make a change in some of the HTML or SCSS files

Result: https://www.screencast.com/t/lnTesI9hbEE

@NickIliev It seems to me that this is not my issue.
Here my result: http://www.screencast.com/t/rz8YewaQk8

@pako8x the hard part is that neither your case nor the case above (reported by another user) are reproducible on our side - we are currently investigating and trying to find a stable way to reproduce the problem. Stay tuned for updates on that matter.

@NickIliev Sure... Thanks for your support!!

I'm in the same situation
OS is windows 10
tns --version 3.3.0

target device (1+1) android version 6.0.1
and emulator with android version 8

Hi @pako8x, @solracph,

Have you managed to resolve the problem?

In case you're not, can you please update to latest NativeScript and try it on your side?

npm i -g nativescript@latest

I have had the exact same problem the past weeks. For some reason, what seems to be helping - at least for me - is to run adb logcat on a seperate console window.

I just did tns platform remove android && tns platform add android and now I can run tns run android --device <MYDEVICEID>

Closing as the issue seems not to be reproducible with the next and latest CLI. Please if anyone has a stable way to reproduce the issue - let me know and I will reopen this one immediately!

Was this page helpful?
0 / 5 - 0 ratings