dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.21k stars 1.75k forks source link

Unable to debug Android MAUI App in Visual Studio for Mac #24395

Closed todorsp closed 2 months ago

todorsp commented 2 months ago

Description

Hello, I know that Visual Studio for Mac is being phased out but still I am asking for help. Please, if the bug report needs to be directed somewhere else, advise.

When creating a brand new maui project from template in Visual Studio for Mac (17.6.14 (build 413)) or any other example project taken here: https://github.com/dotnet/maui-samples when I try to debug using an android emulator image the app gets loaded to the device but I get the following error: Cannot execute xxx/yyy/test.Droid.dll

iOS target can be debugged.

All necessary workloads seem to be installed:

Installed Workload Id Manifest Version Installation Source

maui-ios 8.0.72/8.0.100 SDK 8.0.300
maui-android 8.0.72/8.0.100 SDK 8.0.300
ios 17.5.8020/8.0.100 SDK 8.0.300
maui 8.0.72/8.0.100 SDK 8.0.300
android 34.0.113/8.0.100 SDK 8.0.300

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 2 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

ninachen03 commented 2 months ago

I cannot repro on android platform on the latest Visual Studio for Mac (17.6.14 (build 413))(8.0.80). image

todorsp commented 2 months ago

Hi, I am including some info regarding VS and also screenshots of the same RefreshView Demo you have included:

Visual Studio Community 2022 for Mac Version 17.6.14 (build 413) Installation UUID: f17c8fce-f2bd-49f7-bb46-9a8a2641168d

Runtime .NET 7.0.3 (64-bit) Architecture: Arm64 Microsoft.macOS.Sdk 13.1.1007; git-rev-head:8afca776a0a96613dfb7200e0917bb57f9ed5583; git-branch:release/7.0.1xx-xcode14.2

Roslyn (Language Service) 4.6.0-3.23180.6+99e956e42697a6dd886d1e12478ea2b27cceacfa

NuGet Version: 6.4.0.117

.NET SDK (Arm64) SDK: /usr/local/share/dotnet/sdk/8.0.300/Sdks SDK Versions: 8.0.300 8.0.101 8.0.100 7.0.405 7.0.311 7.0.308 7.0.307 7.0.306 7.0.304 7.0.302 7.0.203 7.0.202 7.0.201 7.0.200 7.0.103 7.0.102 6.0.425 6.0.424 6.0.422 MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET Runtime (Arm64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 8.0.5 8.0.1 8.0.0 7.0.15 7.0.14 7.0.11 7.0.10 7.0.9 7.0.7 7.0.5 7.0.4 7.0.3 7.0.2 6.0.33 6.0.32 6.0.30 6.0.25 6.0.22 6.0.21 6.0.20 6.0.18 6.0.16 6.0.15 6.0.14 6.0.13

Xamarin.Profiler '/Applications/Xamarin Profiler.app' not found

Updater Version: 11

Apple Developer Tools Xcode: 15.4 22622 Build: 15F31d

Xamarin.Android Version: 13.2.2.0 (Visual Studio Community) Commit: xamarin-android/d17-5/45b0e14 Android SDK: /Users/todor/bin/sdks Supported Android versions: 13.0 (API level 33)

SDK Command-line Tools Version: 7.0 SDK Platform Tools Version: 35.0.2 SDK Build Tools Version: 35.0.0

Build Information: Mono: d9a6e87 Java.Interop: xamarin/java.interop/d17-5@149d70fe SQLite: xamarin/sqlite/3.40.1@68c69d8 Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d

Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.16.1 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk 1.8.0.302 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager Version: 17.6.0.50 Hash: a715dca Branch: HEAD Build date: 2024-08-07 17:47:27 UTC

Android Device Manager Version: 0.0.0.1309 Hash: 06e3e77 Branch: HEAD Build date: 2024-08-07 17:47:27 UTC

Xamarin.Mac Not Installed

Xamarin.iOS Version: 16.4.0.23 Visual Studio Community Hash: 9defd91b3 Branch: xcode14.3 Build date: 2023-10-23 16:15:00-0400

Xamarin Designer Version: 17.6.3.9 Hash: 2648399ae8 Branch: remotes/origin/d17-6 Build date: 2024-08-07 17:47:20 UTC

Build Information Release ID: 1706140413 Git revision: 29d5da805da9895dd02785823633e3bcfabdd769 Build date: 2024-08-07 17:45:52+00 Build branch: release-17.6 Build lane: release-17.6

Operating System Mac OS X 14.1.2 Darwin 23.1.0 Darwin Kernel Version 23.1.0 Mon Oct 9 21:27:24 PDT 2023 root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64

Enabled user installed extensions Template Creator 0.9 .NET Core Extensions 0.7


Screenshot 2024-08-23 at 12 04 07 Screenshot 2024-08-23 at 12 04 25

Screenshot 2024-08-23 at 12 05 00
todorsp commented 2 months ago

Ok, reinstalling visualstudioformacinstaller-17.6.0.80.dmg seems to have fixed the problem. Thanks for the feedback, Todor