Closed CostasAthan closed 2 months ago
Hi.
Check the versions installed in the sample (there are both .net and 7 and .net 8 versions).
It will tell you which version to use to solve this.
Hello!
Easier said than done...
Just tried to downgrade Xamarin.Google.UserMessagingPlatform to 2.2.0.1 and that led to knew conflicts...
Error NU1605
Warning As Error: Detected package downgrade: Xamarin.Google.UserMessagingPlatform from 2.2.0.2 to 2.2.0.1. Reference the package directly from the project to select a different version.
MyApp -> Xamarin.GooglePlayServices.Ads 122.3.0.5 -> Xamarin.GooglePlayServices.Ads.Lite 122.3.0.5 -> Xamarin.Google.UserMessagingPlatform (>= 2.2.0.2)
MyApp -> Xamarin.Google.UserMessagingPlatform (>= 2.2.0.1)
Try this:
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android'">
<PackageReference Include="Xamarin.GooglePlayServices.Ads.Lite" Version="122.3.0.4" />
<PackageReference Include="Xamarin.Google.UserMessagingPlatform" Version="2.2.0.1" />
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.3.0.2" />
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.3.0.2" />
</ItemGroup>
No luck! I had already tried adding <PackageReference Include="Xamarin.Google.UserMessagingPlatform" Version="2.2.0.1" />
The same error persists.
Could you copy the android csproj section of your project?
Also just in case, clean your solution and remove the bin and obj folders
On Sun, 14 Jul 2024, 10:47 CostasAthan, @.***> wrote:
No luck! I had already tried adding <PackageReference Include="Xamarin.Google.UserMessagingPlatform" Version="2.2.0.1" />
The same error https://github.com/marcojak/MauiMTAdmob/issues/83#issuecomment-2227282110 persists.
— Reply to this email directly, view it on GitHub https://github.com/marcojak/MauiMTAdmob/issues/83#issuecomment-2227284783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUIPIWWXTWO4IUOD5KHGATZMJCM3AVCNFSM6AAAAABK3AXGO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRXGI4DINZYGM . You are receiving this because you commented.Message ID: @.***>
I had already tried cleaning the solution, but it didn't solve the problem. I also now deleted obj and bin directories following your suggestion and I rebuilt the project. Same error continues to appear.
Here is the relevant code from the .csproj file:
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Plugin.StoreReview" Version="6.2.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.70" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.70" />
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="8.0.7" />
<PackageReference Include="Xamarin.Google.UserMessagingPlatform" Version="2.2.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android'">
<PackageReference Include="Xamarin.GooglePlayServices.Ads.Lite" Version="122.3.0.4" />
<PackageReference Include="Xamarin.Google.UserMessagingPlatform" Version="2.2.0.1" />
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.3.0.2" />
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.3.0.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android34.0'">
<PackageReference Include="Xamarin.GooglePlayServices.Ads">
<Version>122.3.0.5</Version>
</PackageReference>
</ItemGroup>
Remove this part:
If I remember I had the same issues using the latest version of the ads.lite. For now use version 0.4
On Sun, 14 Jul 2024, 10:59 CostasAthan, @.***> wrote:
I had already tried cleaning the solution, but it didn't solve the problem. I also now deleted obj and bin directories following your suggestion and I rebuilt the project. Same error continues to appear.
Here is the relevant code from the .csproj file:
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android34.0'"> <PackageReference Include="Xamarin.GooglePlayServices.Ads"> <Version>122.3.0.5</Version> </PackageReference> </ItemGroup>
— Reply to this email directly, view it on GitHub https://github.com/marcojak/MauiMTAdmob/issues/83#issuecomment-2227287364, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUIPIUJEW27UEI5WGSYMSDZMJDZXAVCNFSM6AAAAABK3AXGO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRXGI4DOMZWGQ . You are receiving this because you commented.Message ID: @.***>
Version 0.4 of what?
<PackageReference Include="Xamarin.GooglePlayServices.Ads.Lite" Version="122.3.0.4" />
On Sun, 14 Jul 2024, 11:14 CostasAthan, @.***> wrote:
Version 0.4 of what?
— Reply to this email directly, view it on GitHub https://github.com/marcojak/MauiMTAdmob/issues/83#issuecomment-2227291866, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUIPIS4XIPFVSOGISGKPRDZMJFRJAVCNFSM6AAAAABK3AXGO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRXGI4TCOBWGY . You are receiving this because you commented.Message ID: @.***>
OK! It actually did work. Thanks for your support!
While trying to install MauiMTAdmob NuGet package, I get the following conflicts:
The AndroidX packages are dependencies.
Xamarin.Google.UserMessagingPlatform is a package needed for showing the Google CMP message and its installation can not be avoided.