Open azrellie opened 1 week 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!
net7
to net8
build fails on Android
(#17426), similarity score: 0.77Note: You can give me feedback by thumbs upping or thumbs downing this comment.
You're using the .NET 9 preview version of the maps NuGet with the .NET 8 versions of the other NuGets. Change the maps one to: <PackageReference Include="Microsoft.Maui.Controls.Maps" Version="8.0.60" />
does that fix it?
You're using the .NET 9 preview version of the maps NuGet with the .NET 8 versions of the other NuGets. Change the maps one to:
<PackageReference Include="Microsoft.Maui.Controls.Maps" Version="8.0.60" />
does that fix it?
I did that, but that did not fix it. I also changed the version of some of the other packages I'm using. Here they are from the csproj file:
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.60" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.60" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Maui.Controls.Maps" Version="8.0.60" />
Could you please add a reproduction project and upload that to a public GitHub repository so we can have a look?
Also I removed your API key from your initial post, you might want to reset that key as it has been published to a public site now and people might misuse it.
Could you please add a reproduction project and upload that to a public GitHub repository so we can have a look?
Will do that in a moment.
Also I removed your API key from your initial post, you might want to reset that key as it has been published to a public site now and people might misuse it.
Oops, I forgot to remove that when copy and pasting stuff. Thanks though.
I started with a clean Maui project, and followed the same setup from the .NET Maui Maps setup page. Same error would occur. But when I removed this part <meta-data android:name="com.google.android.gms.version" android:value="2131165184" />
in the AndroidManifest.xml
file though, the program would load normally if I don't make a map in the xaml file. If I do make a map in the xaml file, then it all loads normally still, the map does too, but the map is just blank. I'm just creating a barebones map via this: <maps:Map x:Name="map"/>
Description
Currently trying to load a map control onto my Android phone, but I get this error when building the app:
I followed the setup for Maui maps from this page: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/map?view=net-maui-8.0. I have looked to other places to find a solution, but nothing was working. I'm also calling
UseMauiMaps()
in theMauiProgram.cs
file (after theConfigureFonts
method). Didn't resolve it. My project is targeting Android devices, and uses .NET 8. The version ofMicrosoft.Maui.Controls.Maps
that I'm using is8.0.61
.Here are the contents of some of the important stuff (if there is any files I need to show, please let me know):
csproj
file:AndroidManifest.xml
file: