Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Desugaring Issue

android

#1

Mobile Question Template

  • What agent version are you using? (click to see release notes)
    5.19.1

  • Please share which platform you have have questions about: iOS, Android or hybrid?
    Android

  • Are you seeing an error? Please paste the stack trace, or add a screenshot for us to review:

app/build/intermediates/transforms/newrelicTransform/dev/debug/18.jar: D8: Interface `retrofit.mime.TypedInput` not found. It's needed to make sure desugaring of `com.newrelic.agent.android.instrumentation.retrofit.ContentBufferingTypedInput` is correct. Desugaring will assume that this interface has no default method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/18.jar: D8: Interface `org.apache.http.client.ResponseHandler` not found. It's needed to make sure desugaring of `com.newrelic.agent.android.instrumentation.httpclient.ResponseHandlerImpl` is correct. Desugaring will assume that this interface has no default method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/18.jar: D8: Interface `org.apache.http.HttpEntity` not found. It's needed to make sure desugaring of `com.newrelic.agent.android.instrumentation.httpclient.HttpResponseEntityImpl` is correct. Desugaring will assume that this interface has no default method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/18.jar: D8: Interface `com.squareup.okhttp.Callback` not found. It's needed to make sure desugaring of `com.newrelic.agent.android.instrumentation.okhttp2.CallbackExtension` is correct. Desugaring will assume that this interface has no default method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/18.jar: D8: Interface `org.apache.http.HttpEntity` not found. It's needed to make sure desugaring of `com.newrelic.agent.android.instrumentation.httpclient.ContentBufferingResponseEntityImpl` is correct. Desugaring will assume that this interface has no default method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/18.jar: D8: Interface `retrofit.client.Client` not found. It's needed to make sure desugaring of `com.newrelic.agent.android.instrumentation.retrofit.ClientExtension` is correct. Desugaring will assume that this interface has no default method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/18.jar: D8: Interface `org.apache.http.HttpEntity` not found. It's needed to make sure desugaring of `com.newrelic.agent.android.instrumentation.httpclient.HttpRequestEntityImpl` is correct. Desugaring will assume that this interface has no default method.
D8: Stripped invalid locals information from 1 method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/19.jar: D8: Methods with invalid locals information:
  java.lang.Object kotlin.collections.SlidingWindowKt$windowedIterator$1.doResume(java.lang.Object, java.lang.Throwable)
  Attempt to read local this but no local information was associated with the value being read.
D8: Stripped invalid locals information from 1 method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/19.jar: D8: Methods with invalid locals information:
  java.lang.Object kotlin.sequences.SequencesKt___SequencesKt$zipWithNext$2.doResume(java.lang.Object, java.lang.Throwable)
  Attempt to read local this but no local information was associated with the value being read.
app/build/intermediates/transforms/newrelicTransform/dev/debug/59.jar: D8: Type `com.google.android.gms.wearable.PutDataMapRequest` was not found, it is required for default or static interface methods desugaring of `void com.adobe.mobile.ConfigSynchronizer.syncData(java.lang.String, com.google.android.gms.wearable.DataMap)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/59.jar: D8: Type `com.google.android.gms.wearable.PutDataMapRequest` was not found, it is required for default or static interface methods desugaring of `com.adobe.mobile.WearableDataResponse com.adobe.mobile.WearableDataConnection.send(com.adobe.mobile.WearableDataRequest)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/59.jar: D8: Type `com.google.android.gms.wearable.DataMapItem` was not found, it is required for default or static interface methods desugaring of `void com.adobe.mobile.WearableDataConnection.onDataChanged(com.google.android.gms.wearable.DataEventBuffer)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/59.jar: D8: Type `com.google.android.gms.wearable.DataMapItem` was not found, it is required for default or static interface methods desugaring of `void com.adobe.mobile.ConfigSynchronizer.restoreConfig(com.google.android.gms.wearable.DataItem)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/59.jar: D8: Type `com.google.android.gms.wearable.Asset` was not found, it is required for default or static interface methods desugaring of `com.google.android.gms.wearable.DataMap com.adobe.mobile.WearableDataRequest$Cache.handle(android.content.Context)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/59.jar: D8: Type `com.google.android.gms.wearable.PutDataMapRequest` was not found, it is required for default or static interface methods desugaring of `void com.adobe.mobile.DataListenerHandheld.handleRequest(com.google.android.gms.wearable.DataMap, com.google.android.gms.common.api.GoogleApiClient, android.content.Context)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/59.jar: D8: Type `com.google.android.gms.wearable.DataMapItem` was not found, it is required for default or static interface methods desugaring of `void com.adobe.mobile.DataListenerHandheld.onDataChanged(com.google.android.gms.wearable.DataEventBuffer, com.google.android.gms.common.api.GoogleApiClient, android.content.Context)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/59.jar: D8: Interface `com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener` not found. It's needed to make sure desugaring of `com.adobe.mobile.WearableDataConnection` is correct. Desugaring will assume that this interface has no default method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/59.jar: D8: Interface `com.google.android.gms.wearable.DataApi$DataListener` not found. It's needed to make sure desugaring of `com.adobe.mobile.WearableDataConnection` is correct. Desugaring will assume that this interface has no default method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/61.jar: D8: Type `org.apache.http.impl.client.DefaultHttpClient` was not found, it is required for default or static interface methods desugaring of `org.apache.http.protocol.BasicHttpProcessor tv.freewheel.utils.http.SimpleHttpClient$2.createHttpProcessor()`
app/build/intermediates/transforms/newrelicTransform/dev/debug/61.jar: D8: Type `org.apache.http.client.utils.URLEncodedUtils` was not found, it is required for default or static interface methods desugaring of `void tv.freewheel.renderers.vast.model.AbstractCreativeRendition.translateToFWCreativeRendition(tv.freewheel.ad.interfaces.ICreativeRendition, tv.freewheel.ad.interfaces.IAdInstance, tv.freewheel.ad.interfaces.IAdInstance, tv.freewheel.ad.interfaces.IConstants)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/61.jar: D8: Type `org.apache.http.impl.client.DefaultRedirectHandler` was not found, it is required for default or static interface methods desugaring of `java.net.URI tv.freewheel.utils.http.SimpleHttpClient$3.getLocationURI(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/61.jar: D8: Interface `org.apache.http.HttpRequestInterceptor` not found. It's needed to make sure desugaring of `tv.freewheel.utils.http.SimpleHttpClient$1` is correct. Desugaring will assume that this interface has no default method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/61.jar: D8: Type `org.apache.http.client.params.HttpClientParams` was not found, it is required for default or static interface methods desugaring of `tv.freewheel.utils.http.ISimpleHttpClient tv.freewheel.utils.http.SimpleHttpClient.newInstance(java.lang.String)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/61.jar: D8: Type `org.apache.http.params.HttpProtocolParams` was not found, it is required for default or static interface methods desugaring of `tv.freewheel.utils.http.ISimpleHttpClient tv.freewheel.utils.http.SimpleHttpClient.newInstance(java.lang.String)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/61.jar: D8: Type `org.apache.http.conn.scheme.PlainSocketFactory` was not found, it is required for default or static interface methods desugaring of `tv.freewheel.utils.http.ISimpleHttpClient tv.freewheel.utils.http.SimpleHttpClient.newInstance(java.lang.String)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/61.jar: D8: Interface `org.apache.http.client.HttpClient` not found. It's needed to make sure desugaring of `tv.freewheel.utils.http.SimpleHttpClient` is correct. Desugaring will assume that this interface has no default method. This missing interface is declared in the direct hierarchy of `tv.freewheel.utils.http.ISimpleHttpClient(classpath class)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/69.jar: D8: Type `com.longtailvideo.jwplayer.cast.CastManager` was not found, it is required for default or static interface methods desugaring of `void com.longtailvideo.jwplayer.core.i.<init>(android.content.Context, android.os.Handler, com.longtailvideo.jwplayer.JWPlayerView, android.webkit.WebView, com.longtailvideo.jwplayer.core.a.e, com.longtailvideo.jwplayer.core.e, com.longtailvideo.jwplayer.fullscreen.a, com.longtailvideo.jwplayer.configuration.PlayerConfig, com.longtailvideo.jwplayer.b.a, com.longtailvideo.jwplayer.a.a, com.longtailvideo.jwplayer.core.c, com.longtailvideo.jwplayer.core.d.c, com.longtailvideo.jwplayer.b.l, com.longtailvideo.jwplayer.cast.a, com.longtailvideo.jwplayer.core.f, com.longtailvideo.jwplayer.core.b, com.longtailvideo.jwplayer.c.e, com.longtailvideo.jwplayer.core.b.e, java.lang.String, com.longtailvideo.jwplayer.core.a.b, com.longtailvideo.jwplayer.core.a.c, com.longtailvideo.jwplayer.b.c)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/69.jar: D8: Type `com.google.ads.interactivemedia.v3.api.ImaSdkFactory` was not found, it is required for default or static interface methods desugaring of `void com.longtailvideo.jwplayer.core.i.l()`
app/build/intermediates/transforms/newrelicTransform/dev/debug/69.jar: D8: Type `com.longtailvideo.jwplayer.cast.CastManager` was not found, it is required for default or static interface methods desugaring of `void com.longtailvideo.jwplayer.JWPlayerFragment.onCreate(android.os.Bundle)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/69.jar: D8: Type `com.longtailvideo.jwplayer.cast.CastManager` was not found, it is required for default or static interface methods desugaring of `com.longtailvideo.jwplayer.core.h$a com.longtailvideo.jwplayer.core.h.a(android.content.Context, com.longtailvideo.jwplayer.configuration.PlayerConfig, com.longtailvideo.jwplayer.JWPlayerView, android.webkit.WebView, com.longtailvideo.jwplayer.b.c)`
app/build/intermediates/transforms/newrelicTransform/dev/debug/72.jar: D8: Type `org.conscrypt.Conscrypt` was not found, it is required for default or static interface methods desugaring of `okhttp3.internal.platform.Platform okhttp3.internal.platform.ConscryptPlatform.buildIfSupported()`
app/build/intermediates/transforms/newrelicTransform/dev/debug/69.jar: D8: Type `com.longtailvideo.jwplayer.cast.CastManager` was not found, it is required for default or static interface methods desugaring of `void com.longtailvideo.jwplayer.JWPlayerSupportFragment.onCreate(android.os.Bundle)`

Please describe what you are seeing:
There are multiple warning during compile time after I added the New Relic library.

How does that differ from what were you expecting to see?
I expect to see no warnings.


#2

Hi Pedro,

Thanks for reaching out to New Relic support on the Explorer’s hub and I’ll be helping you with this issue! I like to gather a bit of information first to make sure we are on the same page.

Can you verify your proguard rules and dexguard config file match our installation directions linked below? Please send over both files please.

https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps

In the meantime, can you try the following:

  • Upgrade the agent to 5.20.0. We just released a new version on Monday and it would be best to use the latest version. It might resolve this issue as well.

  • If the above does not resolve, can you please set android.enableD8=false in your gradle.properties file? I’m curious to see if using DX will resolve this issue and it will help us narrow down to the cause. Setting D8 to false is suggested here https://android-developers.googleblog.com/2018/04/android-studio-switching-to-d8-dexer.html

Thank you for trying those quick actions first. If that does not resolve, I’m ready to look deeper and get more files from you. I look forward to hearing back from you!


#3

Hi Xxia
I did a few tests and here are my findings.

Can you verify your proguard rules and dexguard config file match our installation directions linked below? Please send over both files please.

I have reviewed the Proguard definitions and there were some parameters missing. However, I’m using a dev version without Proguard enabled and I don’t have dexguard in this project.

Upgrade the agent to 5.20.0. We just released a new version on Monday and it would be best to use the latest version. It might resolve this issue as well.

The issue is still present in version 5.20.0

If the above does not resolve, can you please set android.enableD8=false in your gradle.properties file? I’m curious to see if using DX will resolve this issue and it will help us narrow down to the cause. Setting D8 to false is suggested

I’ using Android Studio 3.2.1 and I can’t use android.enableD8=false because desugaring is enabled by default.

* What went wrong:
A problem occurred configuring project ':app'.
> Java 8 language support, as requested by 'android.enableD8.desugaring= true' in your gradle.properties file, is not supported when 'android.enableD8= false'.

I added both options to the gradle.properties to see what happens:

android.enableD8=false
android.enableD8.desugaring=false

Now, there aren’t desugaring warnings, which makes sense because desugaring is disabled, but I have other warnings related to D8.

WARNING: The option 'android.enableD8' is deprecated and should not be used anymore.
Use 'android.enableD8=true' to remove this warning.

I hope this helps.
Let me know if you need more tests or logs.

Thanks
Pedro Laranjeiro


#4

Hi Pedro,

Thank you for doing all that and it is very helpful!

From what I’m seeing, it looks like android.enableD8.desugaring=false fixes the desugaring warnings. It looks like if you have the following in your gradle.properties file, it should suppress all the warnings?

android.enableD8=true
android.enableD8.desugaring=false

Please give that a try and I look forward to hearing back from you!


#5

Hi Xxia
There is still a problem with your suggested approach. I see less warnings but there are still a few.

D8: Stripped invalid locals information from 1 method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/7.jar: D8: Methods with invalid locals information:
  java.lang.Object com.nhaarman.mockitokotlin2.VerificationKt$verifyBlocking$1.doResume(java.lang.Object, java.lang.Throwable)
  Attempt to read local throwable but no local information was associated with the value being read.
D8: Stripped invalid locals information from 1 method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/7.jar: D8: Methods with invalid locals information:
  java.lang.Object com.nhaarman.mockitokotlin2.KStubbing$onBlocking$1.doResume(java.lang.Object, java.lang.Throwable)
  Attempt to read local throwable but no local information was associated with the value being read.
D8: Stripped invalid locals information from 1 method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/25.jar: D8: Methods with invalid locals information:
  java.lang.Object kotlin.collections.SlidingWindowKt$windowedIterator$1.doResume(java.lang.Object, java.lang.Throwable)
  Attempt to read local this but no local information was associated with the value being read.
D8: Stripped invalid locals information from 1 method.
app/build/intermediates/transforms/newrelicTransform/dev/debug/25.jar: D8: Methods with invalid locals information:
  java.lang.Object kotlin.sequences.SequencesKt___SequencesKt$zipWithNext$2.doResume(java.lang.Object, java.lang.Throwable)
  Attempt to read local this but no local information was associated with the value being read.

Desugaring is enabled by default and it’s a part of Android Studio 3.0. When I disable these option I have a warning stating these are deprecated and will be removed.

When I set

android.enableD8=true
android.enableD8.desugaring=false

I see this warning

WARNING: The option setting 'android.enableD8.desugaring=false' is experimental and unsupported.
The current default is 'true'

I feel it is important that this is fixed at it’s core in the NewRelic library. I don’t feel comfortable using deprecated options and I want to avoid issues in the future. I can live with extra warnings for now but I expect these to go in a future release. It makes more difficult to read logs and follow whats happening.

Let me know if I can provide further assistance.


#6

Hi Pedro,

Thank you for doing those tests and I understand the uneasiness you are feeling and wanting to avoid future issues. I want to bring this to the attention of our engineering team. I’ll need a bit of information from you first.

  • Please send your Project level build.gradle file

  • Please send your App level build.gradle file

  • Please set gradle.properties file back to all defaults

  • Please use ./gradlew build assemble[whateverConfigYouAreRunning] -d > buildlog.txt in your project directory and send the buildlog.txt

Thank you for your cooperation and helping to provide this information. If you prefer to send these files privately, I can open a ticket for you. I look forward to hearing back from you!


#7

Hi Xxia
I wasn’t sure if I could share those details so I created a sample project with a similar structure, that shows the issues.
Please find it here New Relic Bug Test

If you do ./gradlew clean assembleDebug you will see a lot of warnings showing up.

Hope this helps.


#8

Hi Pedro,

Thank you so much for providing the sample app! It certainly is helpful and I have passed it along to our engineering team. I know that they are actively engaged with making sure New Relic is prepared for future gradle versions. I appreciate you bringing this to our attention.

If you like, you can subscribe to the RSS feed for Android version releases so you will be updated when future versions are released.

https://docs.newrelic.com/docs/release-notes/mobile-release-notes/android-release-notes

Let me know if there is something else I can help with!


#9

Hi @pedro_laranjeiro,

I know Xi Xia passed along the link to our release notes in his last message, but I wanted to briefly touch base and make sure that you were aware that the release to support these toolsets is now available. If you haven’t already done so, you can update your Agent at any time to gain access to this support.