2

I use Visual Studio 2015 with Cordova tools 5.4.1.
I have an issue while trying to debug my cordova application on android device (from Visual Studio 2015).
The build is successfull but the deployment my device (Galaxy S4) fail just after the command : Querying ADB for attached devices...
I have activated Verbose log but i don't have enough details. Find below the bottom of the log stack:

1> 20 ms CreateBuildInfoMetadata 1 calls
1> 772 ms RunMdaInstall 1 calls
1> 774 ms CallTarget 1 calls
1> 22118 ms MdaVsCli 1 calls
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:22.94
2>------ Deploy started: Project: Amiability, Configuration: Debug Android ------
2> Querying ADB for attached devices...
2>Le fichier spécifié est introuvable
2>Le fichier spécifié est introuvable
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

NB: "Le fichier spécifié est introuvable" means "The specified file cannot be found".

Do you know what's is the problem ? How can i get more details about the missing files ?

Jacques
  • 43
  • 7

5 Answers5

1

I have reinstalled the android SDK, and everything works well now. It's seems sometimes some files get corrupted in the SDK. If i get the same issue again, i will try to know which file or folder is corrupted by cleaning the SDK folders step by step.

Many thanks to you :)

Jacques
  • 43
  • 7
0

I faced more or less the same problem with the latest Cordova CLI release version.

The short answer for you is: Cordova 5.4.1 is not yet fully supported in VS 2015. I was suggested to use Cordova 5.3.3 for now until guys from TACO team will add full support for the latest release of CLI. Please see here for full explanation

P.S. Cordova 5.3.3 is OK to my needs. =)

Community
  • 1
  • 1
  • Thanks you so much for your answer :) – Jacques Mar 08 '16 at 22:27
  • I'm installing the last version of Apache cordova tools (Update 7). I will tell you if it's OK. – Jacques Mar 08 '16 at 22:28
  • @Jacques Welcome :) Give me a hint of your result, 'cause I've recently installed 7-th update of TACO, but haven't yet played with it :) – Stanislav Iegorov Mar 09 '16 at 10:48
  • Hello, bad news, my problem was solved two days ago, just after the installation (of Update 7). But today the problem is back again. I don't know why !!! – Jacques Mar 15 '16 at 01:10
  • Hi, I've just tried to play with Cordova 6.0.0 CLI and the latest TACO and everything seems to work fine except unexpected behaviour of some plugins. So, I used the before-last version of CLI - 5.4.1 and all is OK :) – Stanislav Iegorov Mar 17 '16 at 08:35
  • If you're still having troubles, probably there is a need to clean Cordova cache? Also, I'd suggest to update used plugins to latest versions. Of course, taking those changes in plugins into consideration :) – Stanislav Iegorov Mar 17 '16 at 08:37
0

I was having this exact issue until I started VS2015 as an Administrator. Reran and it seemed to fix the issue.

  • 1
    Running VS2015 with Update 2 and TACO 8.1 once as an Administrator fixed this problem for me as well. For subsequent project loads, I can run as a regular user, but I did run into an issue where I had to delete the Android build folder manually because of permission problems. Now, it's OK though. – SamG Apr 19 '16 at 16:00
  • I'm not sure why this answer has been downvoted. It worked for me. Thanks! – Bartho Bernsmann Oct 12 '16 at 13:26
0

I encountered this problem when my PATH environment variable had grown to exceed 1024 characters, and the path to the android SDK was not in the path, with the result that adb.exe could not be found. If you run adb devices in a terminal, you should see your attached device. If you see 'adb' is not recognized as an internal or external command, then you may have the same problem that I had.

If that's the case, reduce the length of the PATH variable and include the path to the android SDK.

This question gives suggestions on reducing the length of the PATH variable.

In my case the path that needed to be included in the PATH variable was "C:\Program Files (x86)\Android\android-sdk\platform-tools"

You can edit the PATH variable in Control Panel -> System and Security -> System -> Advanced system settings -> Advanced tab -> Environment Variables.

Community
  • 1
  • 1
normanlrx
  • 1
  • 2
0

I reinstalled JDK, Android SDK, Android NDK, updated the repaired my installation of all components of Visual Studio, updated the paths to SDK, NDK, and JDK in Tools --> Android SDK Manager --> and in Tools --> Options --> Xamarin --> Android Settings, and then cleared the Cordova Cache.

To clear the Cordova Cache: tools-->options-->tools for apache cordova--> clear cordova cache.clear cordova cache

Finally, I uninstalled JDK 1.7, and voila! my build worked. (I also needed to fix an issue with package.json but I think that was a separate issue)

Yvonne Aburrow
  • 2,602
  • 1
  • 17
  • 47