Nuget packages for android.arch.work:work-runtime & android.arch.work:work-firebase

BasilJohnBasilJohn NZMember ✭✭
edited January 7 in Xamarin.Android

In my Android binding project, I want to use android.arch.work:work-runtime & android.arch.work:work-firebase packages. These packages are not present in the NuGet.
So I have included these as .jar files but I am getting a runtime exception as

"Didn't find class "androidx.work.R$bool" on path: DexPathList"

in the manifest file, I have added as

provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="'MyApplicatonPackageName'.workmanager-init"
android:enabled="true"
android:exported="true"
Can anyone help me to resolve this issue please?
Many thanks

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    You can try to set the Linking option to None as follows. and then try again.

  • BasilJohnBasilJohn NZMember ✭✭

    Hi @jezh
    Thank you for checking the issue. I have changed the linking properties to None, but it didn't fix the issue.

  • jezhjezh Member, Xamarin Team Xamurai

    Could you please share a basic demo?

  • BasilJohnBasilJohn NZMember ✭✭

    Hi @jezh

    Please find the attached GeneratedBindingInfo. text. I am trying to bind a third party SDK, they are used following libraries.

    db-framework-1.1.1-rc1.aar,
    db-1.1.1-rc1.aar,
    work-firebase-1.0.0-alpha11.aar,
    work-runtime-1.0.0-alpha11.aar,
    runtime-1.1.1-rc1.aar

    In the coming weekend, I will make a demo project.
    Thank you

  • BasilJohnBasilJohn NZMember ✭✭
    edited January 28

    Hi @jezh

    I have bind the WorkRuntime library, but now getting errors as

    Error: error: package androidx.work.impl does not exist androidx.work.impl.ExecutionListener (TestApp.Android) javac
    Error: error: package androidx.work.impl.background.systemalarm.SystemAlarmDispatcher does not exist
    androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.CommandsCompletedListener
    (TestApp.Android) javac
    Error: error: package androidx.work.impl.constraints does not exist androidx.work.impl.constraints.ConstraintListener
    (TestApp.Android) javac

    Has anyone tried using a Java dependency that uses the WorkManager for Xamarin Android?

Sign In or Register to comment.