pendo-io / pendo-mobile-sdk

Pendo captures product usage data, gathers user feedback, and lets you communicate in-app to onboard, educate, and guide users to value
https://www.pendo.io
Other
57 stars 2 forks source link

R8 warning "Missing class android.app.GrammaticalInflectionManager" from pendo-xamarin-forms #107

Closed velocitysystems closed 4 months ago

velocitysystems commented 5 months ago

Platform + Version Android

SDK Version pendo-xamarin-forms 3.0.1.8050

Framework Xamarin.Forms 5.0.0.2622

Describe the bug Platform + Version Android

SDK Version pendo-xamarin-forms 3.0.1.8050

Framework Xamarin.Forms 5.0.0.2622

Describe the bug R8 throws the following warning during build:

##[warning]R8(0,0): Warning : Missing class android.app.GrammaticalInflectionManager (referenced from: int androidx.core.app.GrammaticalInflectionManagerCompat$Api34Impl.getApplicationGrammaticalGender(android.content.Context) and 2 other contexts)
R8 : warning : Missing class android.app.GrammaticalInflectionManager (referenced from: int androidx.core.app.GrammaticalInflectionManagerCompat$Api34Impl.getApplicationGrammaticalGender(android.content.Context) and 2 other contexts) [D:\a\1\s\src\Sample.Droid\Sample.Droid.csproj]
  Missing class androidx.appcompat.graphics.drawable.DrawableWrapper (referenced from: void com.google.android.material.shadow.ShadowDrawableWrapper.<init>(android.content.Context, android.graphics.drawable.Drawable, float, float, float) and 3 other contexts)
  Missing class edu.umd.cs.findbugs.annotations.SuppressFBWarnings (referenced from: void sdk.pendo.io.PendoInternal.<init>(sdk.pendo.io.Pendo$PendoOptions) and 28 other contexts)
  Missing class external.sdk.pendo.io.glide.R$id (referenced from: void external.sdk.pendo.io.glide.request.target.CustomViewTarget.<clinit>())
  Missing class external.sdk.pendo.io.org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement (referenced from: int sdk.pendo.io.w2.m.hashCode())
  Missing class external.sdk.pendo.io.org.conscrypt.Conscrypt$Version (referenced from: boolean sdk.pendo.io.f3.d$a.a(int, int, int))
  Missing class external.sdk.pendo.io.org.conscrypt.Conscrypt (referenced from: boolean sdk.pendo.io.f3.d$a.a(int, int, int) and 9 other contexts)
  Missing class external.sdk.pendo.io.org.conscrypt.ConscryptHostnameVerifier (referenced from: javax.net.ssl.X509TrustManager sdk.pendo.io.f3.d.d() and 1 other context)
  Missing class external.sdk.pendo.io.org.jetbrains.annotations.NotNull (referenced from: java.util.concurrent.atomic.AtomicBoolean external.sdk.pendo.io.okhttp3.internal.publicsuffix.PublicSuffixDatabase.a and 1369 other contexts)
  Missing class external.sdk.pendo.io.org.jetbrains.annotations.Nullable (referenced from: sdk.pendo.io.a3.d sdk.pendo.io.a3.a.c and 369 other contexts)
  Missing class external.sdk.pendo.io.org.openjsse.javax.net.ssl.SSLParameters (referenced from: void sdk.pendo.io.f3.g.a(javax.net.ssl.SSLSocket, java.lang.String, java.util.List))
  Missing class external.sdk.pendo.io.org.openjsse.javax.net.ssl.SSLSocket (referenced from: void sdk.pendo.io.f3.g.a(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 1 other context)
  Missing class external.sdk.pendo.io.org.openjsse.net.ssl.OpenJSSE (referenced from: void sdk.pendo.io.f3.g.<init>())
  Missing class external.sdk.pendo.io.slf4j.impl.StaticLoggerBinder (referenced from: void sdk.pendo.io.s6.b.a() and 3 other contexts)
  Missing class java.awt.AWTEvent (referenced from: boolean external.sdk.pendo.io.mozilla.javascript.tools.debugger.MyTreeTable.isCellEditable(java.util.EventObject) and 2 other contexts)
  Missing class java.awt.ActiveEvent (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.SwingGui.dispatchNextGuiEvent())
  Missing class java.awt.BorderLayout (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.ContextWindow.<init>(external.sdk.pendo.io.mozilla.javascript.tools.debugger.SwingGui) and 1 other context)
  Missing class java.awt.Color (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.FileHeader.paint(java.awt.Graphics) and 2 other contexts)
  Missing class java.awt.Component (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.ContextWindow$1.check(java.awt.Component) and 35 other contexts)
  Missing class java.awt.Container (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.ContextWindow$1.check(java.awt.Component) and 10 other contexts)
  Missing class java.awt.Dimension (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.ContextWindow.<init>(external.sdk.pendo.io.mozilla.javascript.tools.debugger.SwingGui) and 9 other contexts)
  Missing class java.awt.EventQueue (referenced from: java.awt.EventQueue external.sdk.pendo.io.mozilla.javascript.tools.debugger.SwingGui.awtEventQueue and 1 other context)
  Missing class java.awt.Font (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.EvalTextArea.<init>(external.sdk.pendo.io.mozilla.javascript.tools.debugger.SwingGui) and 6 other contexts)
  Missing class java.awt.FontMetrics (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.FileHeader.mousePressed(java.awt.event.MouseEvent) and 3 other contexts)
  Missing class java.awt.Frame (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.FindFunction.<init>(external.sdk.pendo.io.mozilla.javascript.tools.debugger.SwingGui, java.lang.String, java.lang.String) and 1 other context)
  Missing class java.awt.Graphics (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.FileHeader.paint(java.awt.Graphics) and 1 other context)
  Missing class java.awt.GridBagConstraints (referenced from: void external.sdk.pendo.io.mozilla.javascript.tools.debugger.ContextWindow.<init>(external.sdk.pendo.io.mozilla.javascript.tools.debugger.SwingGui))

To Reproduce Build a project with the "pendo-xamarin-forms" package installed.

Expected behavior No build warning should be thrown.

Additional context Build warning was not present in v2.x SDK.

DavidPendo commented 5 months ago

Hi, @velocitysystems thanks for reaching us with a detailed question.

Your question is about all those Pendo-related R8 missing class warnings. In that case, all those warnings can be ignored because the classes are expected to be missing. Actually, within the updated installation instructions for SDK 3.0, we provide all the necessary rules that need to be added to ProGuard include all dontwarn. It can be found here - https://github.com/pendo-io/pendo-mobile-sdk/blob/master/android/pnddocs/xamarin_forms-android.md#using-proguard--r8

Please ensure you add them to your ProGuard rules and let us know if the issue was solved. Best regards.

randmaayan commented 4 months ago

Hi @velocitysystems, we're hoping that David's solution solved your problem, we're closing this issue for now. please open another issue or reach out to us through your Pendo contact if necessary. thanks!