marcojak / MauiMTAdmob

MIT License
104 stars 17 forks source link

Installing com.google.android.ump not working #2

Closed JeroenMBooij closed 1 year ago

JeroenMBooij commented 1 year ago

When I try to run my project I get an error saying package com.google.android.ump does not exist The readme does mention you might have to install some packages. So I tried installing Plugin.GoogleUserMessagingPlatform, but I am still getting the error. What I am suppose to do to resolve the error?

marcojak commented 1 year ago

Have a look at the sample project.

To fix the issue you are seeing, you need to add this to your csproj file:

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-android'">        
    <AndroidLibrary Include="Dependencies\user-messaging-platform-2.0.0.aar" Bind="false" />
</ItemGroup>

You can download the file online or you can find it in the sample project. Create the Dependencies folder in your MAUI project and copy this file inside.

Then you'll project will compile again.

I'll update the readme with this info!