0

I have seen other posts of same kind of error but probably on different vs and windows versions. Tried few things from the posts but nothing worked.

Just created a blank xamarin android app without any code written in it. Did a build, rebuild, clean, restarted system, restarted visual studio, running vs as admin all possible things but nothing worked out.

Below is the message from output window.

2>Done building project "App1.csproj".
2>Build succeeded.
2>An existing connection was forcibly closed by the remote host
2>
2>Deploy failed on Motorola XT1068
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

I am running Visual Studio 2017 with Version 15.4.0 on Windows 10 operating system.

pogibas
  • 27,303
  • 19
  • 84
  • 117
Sharath
  • 2,348
  • 8
  • 45
  • 81

1 Answers1

2

emulator I tried now its working but not on mobile devices gives the same error

There are a few things you can try:

  1. Please check if the target API level of your app is identical to your device's system's API level. You can modify the app's API level by Right click project-> properties->Android Manifest->Target Android Version.
  2. If it doesn't work, please try override your android sdk to the sdk that your android studio is using, you can override the sdk by Tools->Options->Xamarin->Android Settings->Android SDK Location
Elvis Xia - MSFT
  • 10,801
  • 1
  • 13
  • 24
  • Thanks, my app was targetting API level 30 but my emulator was under API level 29. Don't forget to Clean and Rebuild. – Jonathan F. Nov 03 '21 at 13:44