Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

WorkerParameters not working after upgrading to 4.3.0.819712-pre2 #214

Open
jrahma opened this issue Oct 1, 2019 · 6 comments
Open

WorkerParameters not working after upgrading to 4.3.0.819712-pre2 #214

jrahma opened this issue Oct 1, 2019 · 6 comments
Assignees

Comments

@jrahma
Copy link

jrahma commented Oct 1, 2019

Hi,

Why I am started getting this error:

The type 'WorkerParameters' exists in both 'Xamarin.Android.Arch.Work.Runtime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Xamarin.AndroidX.Work.Runtime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

Everything was working before and I don't have the Xamarin.AndroidX.Work.Runtime in my installed Nuget packages.

This happend after installing the latest Xamarin Forms preview 4.3.0.819712-pre2

How can I resolve this please?

Thanks,
Jassim

@jrahma jrahma changed the title WorkerParameters not working after upgrading to WorkerParameters WorkerParameters not working after upgrading to 4.3.0.819712-pre2 Oct 1, 2019
@jrahma
Copy link
Author

jrahma commented Oct 1, 2019

After adding Xamarin.AndroidX I am now getting:

Program type already present: androidx.versionedparcelable.CustomVersionedParcelable

@Redth Redth transferred this issue from dotnet/android Oct 2, 2019
@Redth
Copy link
Member

Redth commented Oct 2, 2019

I believe this is due to the fact that Google decided to name the api's for work manager using the androidx package name in the Android Support library, so having both the old Xamarin.Android.Arch.Work.Runtime and Xamarin.AndroidX.Work.Runtime packages installed is unnecessary and in this case problematic.

Can you try removing Xamarin.Android.Arch.Work.Runtime from your project and rebuilding?

Since the .NET managed API should be the same in both packages, this should still allow you to 'migrate' without changing your managed .net code.

@jrahma
Copy link
Author

jrahma commented Oct 2, 2019

I already tried that but did not work

I had to downgrade by opting out the preview version

@Redth
Copy link
Member

Redth commented Oct 2, 2019

@jrahma do you have a repro sample you could share?

@jrahma
Copy link
Author

jrahma commented Oct 2, 2019

nope, but I will try to make it and update you

@Redth
Copy link
Member

Redth commented Oct 2, 2019

@mattleibow i suspect we're going to need to update the mapping files for the migration package to account more appropriately for this scenario...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants