Android Emulator waiting for debugger to attach in .net maui app

wire_jp 206 Reputation points
2024-05-11T02:31:41.49+00:00

I upgraded my .net maui app from .net 7 to .net 8 and updated my nuget packages. I built the output solution but deployment was not successful as I had received the error message:-

Xaml XC002 erro: Binding could be compiled if x:datatype is specified .net maui

As a result I had update the data type binding references in the xaml code in the Views Folder. After I have built the output solution, the app can be deployed to the emulator. However debugger hangs on splash screen and during the deployment process the emulator showed the following message: -

Waiting For Debugger

Application DataTrackersMauiApp (process com.companyname.datatrackersmauiapp) is waiting for the debugger to attach.

The output window showed the following message: -

Start debugging Android application ...

am start -D -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.datatrackersmauiapp/crc6404617909d487a25b.MainActivity"

warning: Could not connect Jdwp. System.Exception: Process Not Found.

   at Xamarin.AndroidTools.Debugging.DebuggingExtensions.<ConnectJdwpAsync>d__7.MoveNext() in D:\a_work\1\s\External\androidtools\Xamarin.AndroidTools\Debugging\DebuggingExtensions.cs:line 184

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at Xamarin.AndroidTools.Debugging.DebuggingExtensions.<StartWithDebuggingAsync>d__1.MoveNext() in D:\a_work\1\s\External\androidtools\Xamarin.AndroidTools\Debugging\DebuggingExtensions.cs:line 61

[trackersmauiapp] Late-enabling -Xcheck:jni

[trackersmauiapp] Using CollectorTypeCC GC.

[trackersmauiapp] Unexpected CPU variant for x86: x86_64.

[trackersmauiapp] Known variants: atom, sandybridge, silvermont, goldmont, goldmont-plus, tremont, kabylake, default

[CompatibilityChangeReporter] Compat change id reported: 171979766; UID 10190; state: ENABLED

[CompatibilityChangeReporter] Compat change id reported: 242716250; UID 10190; state: ENABLED

[ApplicationLoaders] Returning zygote-cached class loader: /system_ext/framework/androidx.window.extensions.jar

[ApplicationLoaders] Returning zygote-cached class loader: /system_ext/framework/androidx.window.sidecar.jar

[ziparchive] Unable to open '/data/app/~~NJ_7dlSb8F0cDkF1grSybA==/com.companyname.datatrackersmauiapp-U3s_em1anP2Cvh_8wpXHkg==/base.dm': No such file or directory

[ziparchive] Unable to open '/data/app/~~NJ_7dlSb8F0cDkF1grSybA==/com.companyname.datatrackersmauiapp-U3s_em1anP2Cvh_8wpXHkg==/base.dm': No such file or directory

[trackersmauiapp] Background concurrent copying GC freed 2033(181KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1949KB/3899KB, paused 2.053ms,214us total 716.636ms

[nativeloader] Configuring clns-6 for other apk /data/app/~~NJ_7dlSb8F0cDkF1grSybA==/com.companyname.datatrackersmauiapp-U3s_em1anP2Cvh_8wpXHkg==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~NJ_7dlSb8F0cDkF1grSybA==/com.companyname.datatrackersmauiapp-U3s_em1anP2Cvh_8wpXHkg==/lib/x86_64:/data/app/~~NJ_7dlSb8F0cDkF1grSybA==/com.companyname.datatrackersmauiapp-U3s_em1anP2Cvh_8wpXHkg==/base.apk!/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/com.companyname.datatrackersmauiapp

[GraphicsEnvironment] Currently set values for:

[GraphicsEnvironment]   angle_gl_driver_selection_pkgs=[]

[GraphicsEnvironment]   angle_gl_driver_selection_values=[]

[GraphicsEnvironment] ANGLE GameManagerService for com.companyname.datatrackersmauiapp: false

[GraphicsEnvironment] com.companyname.datatrackersmauiapp is not listed in per-application setting

[GraphicsEnvironment] Neither updatable production driver nor prerelease driver is supported.

[System.out] Sending WAIT chunk

 

The Error List window did not show any errors.

What I have tried:-

Shut the .net maui application

Delete the bin and obj folders

Reopen the .net maui application

Delete the Android SDK emulator and create a new Android SDK emulator.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,970 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,369 questions
{count} vote

1 answer

Sort by: Most helpful
  1. wire_jp 206 Reputation points
    2024-05-21T23:55:04.0533333+00:00

    I deleted the existing Android Emulator and I created a new Android Emulator

    Name: Pixel - 5 API 34

    OS: Android 14.0 - API 34

    There is an emulator error message: -

    Device error: Could not get emulator name after starting AVD pixel_5_-_api_34. Ok

    I click the ok button

    I ran a clean solution

    I rebuilt the solution

    I built the solution

    The build process is successful and the output solution deploy successfully.

    The Android emulator show a purple splash screen.

    After some time, it shows the Android emulator shows the following two error message dialog boxes:-

    One error dialog box showed:

    Process systen isn't responding

    Close app

    Wait

    Waiting For Debugger

    Second error dialog box showed:

    Application DataTrackersMauiApp (process com.companyname.datatrackersmauiapp) is waiting for the debugger to attach.