Closed CameronVetter closed 10 months ago
I ended up adding these to my csproj to get things working on android:
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-android33.0'">
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx">
<Version>1.7.2</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-android33.0'">
<PackageReference Include="Xamarin.GooglePlayServices.Base">
<Version>118.2.0.2</Version>
</PackageReference>
</ItemGroup>
interesting, what dotnet version do you have ?
put dotnet --version
to powershell
and also please share output of:
dotnet workload list
My dotnet version is 7.0.306 and my workload list is:
Installed Workload Id Manifest Version Installation Source
--------------------------------------------------------------------------------
android 33.0.68/7.0.100 SDK 7.0.300, VS 17.6.33829.357
ios 16.4.7089/7.0.100 SDK 7.0.300, VS 17.6.33829.357
maccatalyst 16.4.7089/7.0.100 SDK 7.0.300, VS 17.6.33829.357
maui 7.0.92/7.0.100 SDK 7.0.300
maui-android 7.0.92/7.0.100 SDK 7.0.300, VS 17.6.33829.357
maui-ios 7.0.92/7.0.100 SDK 7.0.300, VS 17.6.33829.357
maui-maccatalyst 7.0.92/7.0.100 SDK 7.0.300, VS 17.6.33829.357
maui-windows 7.0.92/7.0.100 SDK 7.0.300, VS 17.6.33829.357
wasm-tools 7.0.9/7.0.100 SDK 7.0.300, VS 17.6.33829.357
I have exactly the same versions,hmm.
Your app targets just Android v33 ? Or this error happens just on that device ?
because you have there specified net7.0-android33.0
instead of basic: net7.0-android
net7.0-android33.0 is what the project template created and put in for my target. VS2022 has been using that when it adds platform specific as above... I followed the example when I added Xamarin.AndroidX.Activity.Ktx, which is workaround for a bug in the current MAUI release when adding google play.
I think the real fix for this is to add a dependency in the nuspec to these two packages. I would have done a PR, but the nuspec isn't in the repo.
can you please post that github issue here ?
can you please post that github issue here ?
Probably it would be better to migrate from Android xamarin package to new MAUI one.
That could theoretically fix the issue without implementing any workarounds.
The whole process should be quite straight-forward. Just replace old nuget with a new one and test if it works correctly. But I am quite busy and I will get to that in a week or two.
So if you have time sooner, you can try it and let me know/create a PR.
After this PR is merged, please let me know if this problem still persists
After this PR is merged, please let me know if this problem still persists
No this is not resolved. This issue is caused by the Revenuecat Xamarin bindings referencing newer versions than the MAUI SDK targets. In fact, it is now worse with this newer version of the RevenueCat bindings and I opened up #13
This can still be worked around using the workarounds in this issue and the other. I still think it could be addressed with dependencies in the nuspec when building this package, I have not tried it though.
Resolved in #27
On Android adding this package results in the following errors:
This is fixed by adding the package Xamarin.GooglePlayServices.Base. I believe this should be a dependency of the nuget package.