pendo-io/pendo-mobile-sdk

Pendo MAUI Nuget - Causes Android Build Errors

Closed this issue · 6 comments

Whenever the latest version of pendo-maui version - 3.3.2.8694 is installed, I am not able to build locally to Android.

I get the following errors:

image

image

I noticed that the following were also installed when the pendo-maui nuget was installed. Shouldn't AndroidX be used instead of Android when using MAUI? It seems like these packages are what is causing the build issue.

image

Hi @wynston-champion-actabl,

Our SDK contains these dependencies, allowing the prompt of an an in-app Android Play Store Review, available via our Pendo guides feature. There are no AndroidX equivalents for these libraries so I don't see this as an issue—see nugget store.

Are you perhaps importing Play Core or Play Review for usage in your application as well? This could explain why it's being generated more than once and then we could fix it by excluding one of the gradle imports.

If not, you mention the issue exists on our latest version. Did you manage to successfully use previous versions of our SDK?

Hi @wynston-champion-actabl! Regarding your issue, can you please send us the list of your project dependency packages by running the dotnet list package --include-transitive?

The pendo-maui nuget package contains only the

Xamarin.Google.Android.Play.Core.Common                    2.0.3.2        
Xamarin.Google.Android.Play.Review                                2.0.1.3        
Xamarin.Google.Android.Play.Review.Ktx                          2.0.1.2       

So, if your project uses some other dependency, maybe PlayCore besides Pendo, it might cause the issue... of more than one managed type...

To exclude certain package from the project dependencies you can try to use

<PackageReference Include="<<package-name>>" Version="<<version>>">
      <ExcludeAssets>All</ExcludeAssets>
</PackageReference>

! Remember that if you exclude the Pendo Play packages, the Pendo in-app-rating feature will not work.

Is there a workaround for that?

Hi @l0gaw, the workaround is to exclude one of the conflicting packages, as was mentioned in the previous comment. In case the excluded package is of Pendo please note that it will affect the in-app-rating feature to not work.

To exclude Pendo use the following:

<PackageReference Include="Xamarin.Google.Android.Play.Core.Common" Version="2.0.3.2" ExcludeAssets="All"/>	
						
<PackageReference Include="Xamarin.Google.Android.Play.Review" Version="2.0.1.3" ExcludeAssets="All"/>

<PackageReference Include="Xamarin.Google.Android.Play.Review.Ktx" Version="2.0.1.2" ExcludeAssets="All"/>

Thanks. This workaround worked!

@DavidPendo I am still having the same errors with the solution your provided above.

These are the packages I am using in my project:

<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.4.0.5" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'" />

<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.4.0.4" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'" />

<PackageReference Include="Xamarin.AndroidX.Activity" Version="1.9.0.3" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'" />

<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.9.0.3" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'" />

<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.8.0.3" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'" />`