You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
D8-R8 fails with Missing class error without enough information #2670
Problem seems to be with the onesignal nuget package referencing those namespaces and classes. please see the repro attached. it is still not clear for me why r8 returns warning or error for those. because i dont want to keep those classes and no where in my project, i access them.
What this does is pass -libraryjar to proguard and -lib to r8. It allows these command-line tools to know about these libraries, but they won't get included in your final APK.
What can you do now? About the org.apache.httpclient thing?
You can find C:\Program Files (x86)\Android\android-sdk\platforms\android-28\optional\org.apache.http.legacy.jar. Include it in your Android project the same way as the Amazon stuff:
You will also need the AndroidManifest.xml changes. Here is a full project that worked for me with VS 2019 Preview 3: App1.zip
Hope this solves your issue!
Reacted by Thomas Hagström, Allister, Mikolaj Kieres, Ed Lomonaco, Mario Henrique Lopes Duarte, Brandon Minnick, Jorge Castro, Rob Wilson, Ataberk UZKAL, Mykola Shpotenko and 4 more
Another quicker solution is to enable D8 as dex compiler, and R8 as code shrinker, and disable multidex in debug mode only.
All warnings will disappear as these missing classes are not used anyway, and will be optimized away by R8.
Reacted by Hiago Maciel and Didac Vallhonesta Mendoza
ghost locked as resolved and limited conversation to collaborators on Jun 6, 2022
Activity
EmilAlipiev commentedon Jan 30, 2019
Problem seems to be with the onesignal nuget package referencing those namespaces and classes. please see the repro attached. it is still not clear for me why r8 returns warning or error for those. because i dont want to keep those classes and no where in my project, i access them.
jonathanpeppers commentedon Feb 21, 2019
org.apache.httpclient
Part of this error is solved by: #2736
After adding to
AndroidManfest.xml:Errors about
org.apache.httpgo away:R8 : warning : Missing class: org.apache.http.client.methods.HttpEntityEnclosingRequestBaseIt will be coming in a future VS 2019 release.
Amazon
First I downloaded the Amazon SDKs here: https://developer.amazon.com/sdk-download
I put these two jar files in the Android project:
amazon-device-messaging-1.0.1.jarin-app-purchasing-2.0.76.jarThen I added to my
csproj:What this does is pass
-libraryjarto proguard and-libto r8. It allows these command-line tools to know about these libraries, but they won't get included in your final APK.What can you do now? About the org.apache.httpclient thing?
You can find
C:\Program Files (x86)\Android\android-sdk\platforms\android-28\optional\org.apache.http.legacy.jar. Include it in your Android project the same way as the Amazon stuff:You will also need the
AndroidManifest.xmlchanges. Here is a full project that worked for me with VS 2019 Preview 3: App1.zipHope this solves your issue!
Changes to use D8/R8
softlion commentedon Mar 27, 2020
Another quicker solution is to enable D8 as dex compiler, and R8 as code shrinker, and disable multidex in debug mode only.
All warnings will disappear as these missing classes are not used anyway, and will be optimized away by R8.