Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

R8 enabled gives build error: Compilation can't be completed because some library classes ar

$
0
0

Currently we are trying to change the Multi-dex from dx to D8 but unfortunately we are getting a build error after doing this.

The build error we get is:

R8 : warning : Missing class: com.samsung.android.fingerprint.FingerprintManager$EnrollFinishListener
R8 : warning : Missing class: com.samsung.android.fingerprint.FingerprintIdentifyDialog$FingerprintListener
R8 : warning : Missing class: android.arch.paging.PositionalDataSource
R8 : warning : Missing class: com.samsung.android.fingerprint.IFingerprintClient$Stub
R8 : error : Compilation can't be completed because some library classes are missing.
104 Warning(s)
1 Error(s)

Time Elapsed 00:01:21.69

========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Because of this error I though there was something wrong with one of the libraries we are using (https://github.com/smstuebe/xamarin-fingerprint) but when I create a new Android project and only add this nuget package to the project and enable D8, I don't get the above build error.

So my question is, what could be the reason for this build error? I tried to change several settings in .csproj but none of them worked.

Note: for dx we had to add these two lines in the csproj:

<DxExtraArguments>--force-jumbo </DxExtraArguments>
<AndroidMultiDexClassListExtraArgs>--disable-annotation-resolution-workaround</AndroidMultiDexClassListExtraArgs>

Without these two lines we get the following error while building with Multi-dex (Dx)
com.android.dex.DexException: Too many classes in --main-dex-list, main dex capacity exceeded

So maybe we need a D8 equivalent for these two lines of code?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>