question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't find android devices after moving Android directories

See original GitHub issue

Tell us about the problem

I moved the Android (containing android-sdk and AndroidStudio directories) and .android directories to another hard drive because of space issues. I changed all environment variables that were linked to the previous location. (ANDROID_HOME, ANDROID_SDK_HOME and 2 others in the PATH) When I run tns run android, I have the following error Cannot find connected devices. and there indeed isnt any device found when running tns devices. Also, tns doctor finds no issues. Note that everything was working as intended before moving the directories and changing the env variables.

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.4.0
  • Cross-platform modules: 3.4.0

Please tell us how to recreate the issue in as much detail as possible.

  1. Install all the dependencies with @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))" as told in the Windows Quick Setup
  2. Move the Android and .android directories to another hard drive
  3. Run tns run android into any NS project you have

I imagine I must have missed something to change but I can’t find what.

Regards.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Nqstycommented, Jan 10, 2018

@NickIliev It appears that the combination of Nexus 5X and the API 27 was the problem. I changed for a Nexus 6 and it’s working. I can’t find why the combination doesn’t work anymore though. Thank you a lot for your help through this issue! 😃

0reactions
NickIlievcommented, Jan 11, 2018

@Nqsty FYI: sometimes the newly created emulators are popping up a dialog that requires user interaction to grant authorization (just like the first time authorization for USB Debbuging on a real device), so maybe that was the case. I had similar cases where the prompt on the emulator has blocked the execution of any tns (or adb) commands so I had to explicitly grant access (by tapping the option in the prompted dialog).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio doesn't see device - Stack Overflow
Open up your device manager, navigate to your android device, right click on it and select Update Driver Software then select Browse driver ......
Read more >
Fixes when Android Files Do Not Showing Up on a PC
Pull down the top of the screen and select Tap for Other USB Options. Be sure Transferring Files / Android Auto is selected....
Read more >
Move files to an existing folder in Internal storage
On your Android device, open Files by Google · At the bottom, tap Browse · Scroll to "Storage devices." · Tap Internal storage....
Read more >
How to Fix: Android File Transfer Could Not Connect to Device
Possible Reasons for Android File Transfer not Working · Android File Transfer Could Not Connect to Device – 5 Fixes · Fix 1....
Read more >
Android file management: An easy-to-follow guide
From managing files on your phone to seamlessly syncing folders with your computer, ... After all, your Android device is a productivity powerhouse....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found