-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to start debugging with an android physical device (Hot Reload) #9573
Comments
This phrasing is confusing, are you trying to debug or use hot reload? The error looks like the debugger is not connecting.
Does the default template with no changes work? What change did you make that "breaks" things? The error looks like what you would see if you put the emulator in airplane mode, for example. |
I can't debug when I try to use a physical Android device.
No work.
Shouldn't the template, without any modifications, work without errors?
Basically, trying to get around the 'ADB0020' error, I only added these lines:
|
I do this daily, and it is working for me. What device are you using? Can you share a
Is the device a 32-bit device? If so, you would need to list <RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">android-arm;android-arm64;android-x64;</RuntimeIdentifiers> A |
Not for me, even using the default template without any changes Are you trying an emulator or are you trying to use a physical device for this test? because in the emulator it works normally.
I attributed the log to open ticket to try to help.EngineTrace_4472.txt
I know, I explained what happens when you try to debug a physical device using the default template, without any changes.
I added all the code from the 'csproj' project to the ticket. Maybe the problem is with arm.. But, don't you agree that this should already come by default in the default template, if we consider that more than 90% of the time we will come across ARM devices on Android? Thank you very much for the excellent help, I'm sure the team will solve it! Because you are excellent! |
The logs above are not
The default is |
It's a possibility. |
You already mentioned the solution for this which is to add
|
Device Android: Okay, I cleared everything. 1 - I created a default template without any changes to the '.Net Maui App'. 2 - If I try to debug on the Android device), it will give an error: 3 - I add the line you passed: 4 - Return the error 5 - Add 'project.assets.json' to help |
This feels like an IDE/Visual Studio/project system bug, but you may have to close and reopen the project to force it to run NuGet restore again. You might also try |
I try add two lines:
The error has stopped choosing arm32, I can generate the apk and add it to the device, but the error that started it all comes back (not able to debug): I feel like I'm in a loop. |
I formatted my machine. I only installed Visual Studio. I chose the "MAUI App" model and without any modifications I tried to generate the debug on the physical device and I had exactly the same error. I believe there must be a problem with Visual Studio generation. |
Android framework version
net9.0-android
Affected platform version
VS 17.12.2, SDK 9.0.100, Windows 11 24H2
Description
The system compiles the code and sends it to the Android phone, however, after generating the .apk package in the system correctly, Visual Studio does not allow me to debug it.
I can open the generated package on my cell phone without errors, but I cannot debug it using 'hot reload' in any way.
Cell phone model: Motorola G(8)
Android Version: Android 10
Detail, on the same machine I have another application developed in Xamarin for the same cell phone, and I can debug it normally.
Steps to Reproduce
Video Error:
https://github.com/user-attachments/assets/4260e896-6c6a-4fd8-9101-87aff3ee9893
1 - Start Visual Studio
2 - Create a New Project
3 - .NET MAUI App (name: ExemploAndroid)
4 - Net 9
('include sample content' NOT selected)
Change the file 'ExemploAndroid.csproj' to:
Plug in your cell phone (already configured in developer mode), choose to debug and after deployment, Visual Studio stops debugging.
Did you find any workaround?
unfortunately not.
Relevant log output
The text was updated successfully, but these errors were encountered: