Unable to run the android app in VS2015

2»

Posts

  • alrightalright USMember

    I solved this issue by changing android sdk path. If you have another sdk path, you can do so or install fresh android sdk

  • aisacaisac ✭✭ DEMember ✭✭

    Solved ( genymotion users)

    Go to Genymotion select the virtual device you are using.

    Settings>>ADB>>Select the option "Use Custom Android SDK tools">>copy and paste the same location your sdk (like in Visual Studio >>Android Settings >>Android SDK Location

    restart genymotion. It worked for me!

  • alrightalright USMember

    and then I set sdk location to the previous one, I didn't get any error. I think that may not be a sdk problem.

  • kvothekvothe USMember

    I had this problem as well, changing the genymotion adb worked like a charm! Thanks guys!

  • SteveGraySteveGray ✭✭ GBMember ✭✭

    Been suffering with this problem for the last few days, just managed to sort it out now. I had tried everything, reinstall of Xamarin, both latest and 4.0.4 (I think). Reinstalled the Java SDK. Reinstalled the Android SDK. Nothing seemed to help.

    In the end I searched the c: drive for all instances of adb.exe - of which there appeared to be two, one was the in the android SDK and the other was with the HTC Sync Master software (a phone I've not even owned for over 6 months). After uninstalling all the HTC software I was still experiencing the same problem. Another search of the c: revealed that the uninstall had not removed HTC's adb.exe file.

    In the end I just deleted the adb.exe that was still present in the HTC folder and after that the project compiled and deployed to my device!

    The weird thing with this is the output generated during compile only showed the adb.exe in the Android SDK - no mention of the HTC stuff. Also the HTC software had been installed for at least a year.

    Hope this helps someone :)

  • KhangNguyen.5586KhangNguyen.5586 USMember
    edited July 2016

    I have same problem, but cannot solve :(
    I'm not using genymotion.
    Environments:

    • Win 10, 64 bit
    • VS 2015
    • Install Xamarin and all other extra through Visual Studio (Programs and Features => VS => Change => Ticked on: Cross PlatformC#/.NET (Xamarin v4.1.1); MS VS Emulator for Android July 2016; Android SDK; Android SDK Setup API Level 19,21,23;....)

    As some has suggests above, when I try searching for adb.exe, there are few of them in C:\ drive:
    C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe (1.41 MB, 30 July 2016)
    C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0\lib\android\bin\adb.exe (2.42 MB, created 2012)
    C:\Program Files (x86)\Adobe\Adobe Flash CS6\AIR3.2\lib\android\bin\adb.exe (2.42 MB, created 2012)
    and one in my Xamarin installed folder:
    D :\Software\Xamarin\android-sdk\platform-tools\adb.exe (1.4 MB, 15 July 2016)

    Every time when debugging Android, it start the emulator well, showing up the simulated Android phone then stop with error below. I have spent couple of days working around but still struggling with this error, just want to give-up Xamarin.

    =============
    1>Build started.
    1>C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe ......
    1>App1.Droid -> D :\1.Libraries\Documents\Visual Studio 2015\Projects\Xam04\App1\App1\App1.Droid\bin\Debug\App1.Droid.dll
    1>D :\Software\Xamarin\android-sdk\platform-tools\adb.exe -s 169.254.220.177:5555 shell getprop ro.build.version.sdk
    1>"adb.exe" exited with code 1.
    1>A numeric comparison was attempted on "$(_DeviceSdkVersion)" that evaluates to "" instead of a number, in condition "$(_DeviceSdkVersion) >= 21".
    1>Build FAILED.
    1>
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

  • KhangNguyen.5586KhangNguyen.5586 USMember

    Update for my post above:
    From the suggestion here: https://bugzilla.xamarin.com/show_bug.cgi?id=42168
    I found out that the Path setting in Registry "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools" is difference with one in** VS: Tool => Options => Xamarin => Android Settings => Android SDK Location**. After changing the path in VS to match with one in Registry, the build of apps was successful!

    Again, this is not regarding to genymotion simulator.

  • GamboltGambolt USMember

    @KhangNguyen.5586 said:
    I have same problem, but cannot solve :(
    ...
    1>D :\Software\Xamarin\android-sdk\platform-tools\adb.exe -s 169.254.220.177:5555 shell getprop ro.build.version.sdk
    1>"adb.exe" exited with code 1.
    1>A numeric comparison was attempted on "$(_DeviceSdkVersion)" that evaluates to "" instead of a number, in condition "$(_DeviceSdkVersion) >= 21".
    1>Build FAILED.
    1>
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

    Try this:

    @Gambolt said:
    Hi guys. Killing of shuame_helper process helps to me...
    this process raising every time you connect your device to PC and it takes Tcp-port nessesary to poll device...

  • penneywangpenneywang USMember

    @Gambolt said:

    @KhangNguyen.5586 said:
    I have same problem, but cannot solve :(
    ...
    1>D :\Software\Xamarin\android-sdk\platform-tools\adb.exe -s 169.254.220.177:5555 shell getprop ro.build.version.sdk
    1>"adb.exe" exited with code 1.
    1>A numeric comparison was attempted on "$(_DeviceSdkVersion)" that evaluates to "" instead of a number, in condition "$(_DeviceSdkVersion) >= 21".
    1>Build FAILED.
    1>
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

    Try this:

    @Gambolt said:
    Hi guys. Killing of shuame_helper process helps to me...
    this process raising every time you connect your device to PC and it takes Tcp-port nessesary to poll device...

    can you tell me how to solve this problem details , i also can't debug app with by device.

  • GonzaPerezGonzaPerez ARMember

    @ChristopherAmos Thank you for solved my problem.

  • RicardoColomboOliveiraRicardoColomboOliveira ✭✭ USMember ✭✭

    In my case it was a conflict with Android Studio.

    To fix it, I just had to open the SDK Manager and Update the Build Tools.

  • can you tell me how to solve this problem details , i also can't debug app with by device.

    Open TaskManager window, find and kill shuame_helper.exe. Any way in output window (when you try to start debugging) you can see adb-command (Looks like: "adb.exe -s shell getprop ro.build.version.sdk") which generate an error. Just copy this command to the command line and execute. You will see that adb driver can't bind to tcp port. You need to kill process that already uses this port. Even as an option, make sure that system and Xamarin use adb-driver from same location on drives. I had that installed two different versions on different drives and the system uses one, but Visual Studio uses another. In that case, will be same error.

  • mara0209mara0209 CAMember

    In my case, the problem was (is) that my device reported itself as "ZTB X", so this:
    C:\Users\\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s ZTB X shell getprop ro.build.version.sdk
    fail because it should be:
    C:\Users\alexandre.marcoux\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s "ZTB X" shell getprop ro.build.version.sdk
    Opened a bug...
    https://bugzilla.xamarin.com/show_bug.cgi?id=42168
    My only workaround was to change tablet...

Sign In or Register to comment.