Android Emulator waiting for debugger to attach in .net maui app
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.