API calls not responding on Xamarin Android Debug mode

Shahroz Jan 0 Reputation points
2023-07-27T23:32:08.7566667+00:00

Basically whenever I select debug configuration on Android in Visual Studio, None of the API calls work. They are sent but there is never any response. Internet is working and so are the API calls when I switch to iOS. They are working on release configuration on Android.

Properties for both of them.

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>    
<DebugType>full</DebugType>    
<Optimize>false</Optimize>    
<OutputPath>bin\Debug</OutputPath>    
<DefineConstants>DEBUG;</DefineConstants>    
<ErrorReport>prompt</ErrorReport>    
<WarningLevel>4</WarningLevel>    
<AndroidUseAapt2>true</AndroidUseAapt2>    
<AndroidDexTool>d8</AndroidDexTool>    
<AndroidSupportedAbis>arm64-v8a;armeabi-v7a</AndroidSupportedAbis>    <AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>    
<AndroidPackageFormat>apk</AndroidPackageFormat>    <AndroidEnableProfiledAot>true</AndroidEnableProfiledAot>    <AndroidLinkMode>None</AndroidLinkMode>  
</PropertyGroup>  

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">    
<DebugSymbols>false</DebugSymbols>    
<DebugType>none</DebugType>    
<Optimize>true</Optimize>	  
<AndroidPackageFormat>aab</AndroidPackageFormat>    <AndroidDexTool>d8</AndroidDexTool>    
<AndroidUseAapt2>true</AndroidUseAapt2>    
<OutputPath>bin\Release</OutputPath>    
<ErrorReport>prompt</ErrorReport>    
<WarningLevel>4</WarningLevel>    <AndroidManagedSymbols>true</AndroidManagedSymbols>    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>    <AndroidSupportedAbis>armeabi-v7a;arm64-v8a</AndroidSupportedAbis>    <AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>  
</PropertyGroup>
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,261 questions
{count} votes