-
Notifications
You must be signed in to change notification settings - Fork 56
Build fails when using WorkManager and D8 #168
Comments
Any update on this issue? I am having similar situation and trying to bind a library that is using Room, the exact same error (Missing class: android.arch.paging.PositionalDataSource) is showing up as well. And I cannot seem to find a package that contains this class. Thanks. |
Update: manually including the android.paging common jar (tested with |
Xamarin.Firebase.JobDispatcher nuget has been removed from nuget.org. |
I've opened this ticket more than 2 months ago, and so far it's been totally ignored. |
Has someone get the solution of this problem. We are getting this error in release mode. |
I've managed to find a workaround (even if I do not fully understand why it works...):
@riteshdubey86, hope this helps! |
Same problem here. The workaround provided by @tranb3r isn't working for me. "Proguard configuration file 'C:\Users\user.nuget\packages\xamarin.android.arch.persistence.room.runtime\1.1.1.1\build....\proguard\proguard.txt' was not found.'" "Proguard configuration file 'C:\Users\user.nuget\packages\xamarin.android.arch.work.runtime\1.0.0\build....\proguard\proguard.txt'" "Missing class: android.arch.paging.PositionalDataSource" using NuGet Xamarin.Android.Arch.Work.Runtime |
@martijn-nap just add |
That does not (re)solve anything... Same errors still happen |
That's what I have and works fine to me @martijn-nap. Try adding the notwarn too, such that you end up with:
|
It might be for other reasons tho, following is my proguard cfg I use to one of my projects where I have workers: Proguard.txt Try it and let us know @martijn-nap |
Works with your file! Going to narrow it down now to see what the missing rule is. EDIT: thanks for the help! Problem was that |
Yeah, you're missing something else in your proguard cfg. Afaik it should tell you if you check carefully your build log tho. After all, I've been populating my cfg from there (+ the standard Xamarin suggested ones) |
@martijn-nap @diegostamigni |
@Redth Any progress on this issue ? |
I'm getting MSB6006: "java.exe" exited with code 1. VS: 16.3.1 after setting proguard.cfg and LinkerConfig.xml 2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.D8.targets(81,5): error MSB6006: "java.exe" exited with code 1. |
The proguard warnings should be fixed in: Please let us know if this resolves the issue. |
issue is fixed |
No more warnings but I still need to add some rules to my proguard.cfg in order for it to work. |
Error persists when using R8 shrink. |
Getting error 2>R8 : warning : Missing class: android.arch.paging.PositionalDataSource VS: 16.3.8 |
I turned off MultiDex and it fixed it for me |
Morning, after updating to Visual Studio 16.5 we again have build issues. This is on Mac and Windows. And when I don't, it has trouble seeing *.png for some reason I'll do more investigation to try and figure out what is going on. We have a complex application from XF1.x so it could be anything. |
Hi, yes we have the same issue as of 16.5.1 and still see it on 16.5.2. Error is; Something has definitely broken, am happy to downgrade to 16.4.x temporarily if there is away to do that? |
Facing same issues after updating visual studio on Mac. |
Xamarin.Android Version (eg: 6.0):
9.3.0.14
Operating System & Version (eg: Mac OSX 10.11):
Windows 10 1809
Support Libraries Version (eg: 23.3.0):
28.0.0.1
Describe your Issue:
Enabling D8 when using Workmanager causes Build to fail.
Steps to Reproduce (with link to sample solution if possible):
Add Xamarin.Android.Arch.Work.Runtime NuGet package and use the WorkManager to enqueue some worker.
Enable D8 in android csproj (
<AndroidDexTool>d8</AndroidDexTool>
)R8 or Proguard is NOT enabled.
Build fails.
You can use this sample to reproduce : https://github.com/JonDouglas/WorkManagerSample
When enabling D8, build fails.
Include any relevant Exception Stack traces, build logs, adb logs:
R8 : warning : Missing class: android.arch.paging.PositionalDataSource
R8 : error : Compilation can't be completed because some library classes are missing.
The text was updated successfully, but these errors were encountered: