The part of my csproj file that caused my Android emulator to not appear is this:
<PropertyGroup>
<PlatformTarget>AnyCPU</PlatformTarget>
<TargetFrameworks>net8.0-ios</TargetFrameworks>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<CodesignKey>Apple Development: XXX</CodesignKey>
<CodesignProvision>MauiDemoApp</CodesignProvision>
<CodesignEntitlements>Platforms/iOS/Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
The real problem is in <TargetFrameworks>net8.0-ios</TargetFrameworks>. That invalidated all previously allowed target frameworks. Also some were already set at the start of the csproj. So The above block was changed to this and it solved my problem:
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0-ios'">
<CodesignKey>Apple Development: XXX</CodesignKey>
<CodesignProvision>MauiDemoApp</CodesignProvision>
<CodesignEntitlements>Platforms/iOS/Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
In addition, I also have to do this at command line:
ADB_MDNS_OPENSCREEN=0 adb start-server
If I don't do this, adb server will not be able to start and the android environment analysis will run forever without been able to output the result which I showed you earlier.