Elohist
Elohist

Reputation: 75

Deploy failed in Visual Studio 2022 Xamarin android project

Why visual studio always fail to deployed. I need to close it to deploy, but later while using, it does not work again. Also when I Ctrl+S multiple times before deployment sometimes it works, but most of the time it does not work. It there anything I need to do for it to work?

Console result

Upvotes: 0

Views: 3647

Answers (3)

Nikita
Nikita

Reputation: 11

I also had the same problem, I fixed the problem by going to my registry editor and going to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node.

When you reach this stage you might find out that the Android SDK Tools Key is missing, So you must add a key with the name "Android SDK Tools" (without the quotes)
After adding it, you must now add a key within the Android SDK Tools key file called Path (this must be added as a key). Then, you must modify the path by adding the Android-SDK file path.

Then restart your computer and that's it. Please see the video by Codebuns (https://www.youtube.com/watch?v=D6AElkDz9oM)

Upvotes: 1

user2153142
user2153142

Reputation: 804

You may want to check issue #6652 on https://github.com/xamarin/xamarin-android, posted Jan 19th.

You appear to have the same problem. No, fix as yet, but there is a reasonably quick workaround. Just close the solution, via the File menu and reopen it and then deploy, way faster than closing VS and opening the solution again.

Upvotes: 2

Douglas Marttinen
Douglas Marttinen

Reputation: 469

I am having the same issues. I suspect the problems started when I updated Android Studio to the latest version.

I have found some success in going into Task Manager and killing all of the running adb.exe processes and then retrying the deploy.

Upvotes: 1

Related Questions