cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Android AppDynamics plugin (22.2.2 latest at the moment) does not work with latest Android Gradle Plugin (7.2.1)

App compilation passed successfully but fire a runtime exception

2022-06-27 13:57:02.201 5632-5632/my.package.name E/AndroidRuntime: FATAL EXCEPTION: main
Process: my.package.name, PID: 5632
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/appdynamics/eumagent/runtime/networkrequests/OkHttp3$OkHttpClient$Constructor$INIT;
at okhttp3.OkHttpClient$Builder.build(Unknown Source:2)
at my.package.name.dagger.ServiceFactoryModule.provideOkHttpClient(SourceFile:7)
at my.package.name.dagger.ServiceFactoryModule_ProvideOkHttpClientFactory.provideOkHttpClient(Unknown Source:0)
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC$SwitchingProvider.get0(SourceFile:99)
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC$SwitchingProvider.get(SourceFile:9)
at hf.b.get(SourceFile:5)
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC$SwitchingProvider.get1(SourceFile:92)
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC$SwitchingProvider.get(SourceFile:8)
at hf.b.get(SourceFile:5)
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC.injectMyAppApplication2(SourceFile:4)
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC.injectMyAppApplication(Unknown Source:0)
at my.package.name.application.Hilt_MyAppApplication.onCreate(SourceFile:1)
at my.package.name.application.MyAppApplication.onCreate(SourceFile:1)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassNotFoundException: com.appdynamics.eumagent.runtime.networkrequests.OkHttp3$OkHttpClient$Constructor$INIT
at okhttp3.OkHttpClient$Builder.build(Unknown Source:2) 
at my.package.name.dagger.ServiceFactoryModule.provideOkHttpClient(SourceFile:7) 
at my.package.name.dagger.ServiceFactoryModule_ProvideOkHttpClientFactory.provideOkHttpClient(Unknown Source:0) 
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC$SwitchingProvider.get0(SourceFile:99) 
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC$SwitchingProvider.get(SourceFile:9) 
at hf.b.get(SourceFile:5) 
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC$SwitchingProvider.get1(SourceFile:92) 
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC$SwitchingProvider.get(SourceFile:8) 
at hf.b.get(SourceFile:5) 
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC.injectMyAppApplication2(SourceFile:4) 
at my.package.name.application.DaggerMyAppApplication_HiltComponents_SingletonC.injectMyAppApplication(Unknown Source:0) 
at my.package.name.application.Hilt_MyAppApplication.onCreate(SourceFile:1) 
at my.package.name.application.MyAppApplication.onCreate(SourceFile:1) 
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460) 
at android.app.ActivityThread.access$1300(ActivityThread.java:219) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859) 
at android.os.Handler.dispatchMessage(Handler.java:107) 
at android.os.Looper.loop(Looper.java:214) 
at android.app.ActivityThread.main(ActivityThread.java:7356) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
2022-06-27 13:57:04.477 1840-5714/? E/ResolverController: No valid NAT64 prefix (101, <unspecified>/0)
2022-06-27 13:57:04.822 1840-5715/? E/ResolverController: No valid NAT64 prefix (101, <unspecified>/0)
2022-06-27 13:57:06.371 5632-5677/my.package.name E/FirebaseInstanceId: Failed to get FIS auth token

Before AGP version update :myapp:transformClassesWithAppDynamicsForRelease task was successful without any warning.

After the AGP plugin update it is giving a warning from R8

 

>  WARNING:R8: Missing class com.appdynamics.eumagent.runtime.networkrequests.OkHttp3$Request$Builder$build (referenced from: okhttp3.Request 

 

 

 

13 REPLIES 13

Aboubacar.Traore
AppDynamics Team (Retired)

Hello @Konstantin.Aksenov ,

I have opened a case with the internal team. We will follow up as soon as possible...

 

Aboubacar Traore

Tony.Zhang
AppDynamics Team

Hi,

Thanks for reaching out about this issue. Just to clarify, the app builds fine, but upon loading the app in an emulator or real device, there is a fatal exception?
Was this a problem previous versions of the Android gradle plugin? 7.2.x was a May release. So what is the last version were you previously on such that it wasn’t an issue? 

Also, what version of gradle are you using?

Lastly, is this an easily reproducible issue on any app or is it specific to a particular project? And has a case with support been opened?

Thank you

@Tony.Zhang thanks for quick response.

App have fatal runtime exception on both emu and physical devices.

Previous AGP was 7.1.3 but the issue from 7.2.0

Gradle wrapper version:  7.4

Probably it can be reproduced on any project with okHttp3 usage. However it's a runtime exception and require to make a http call.

Also I did't open any support cases. I guess that it is a one.

@Konstantin.Aksenov 

 

Thank you fro the details. Another quick question, does this happen on debug and release versions of the app or just one?

I will try to reproduce the issue on my end. If I am able to we will investigate further. If not, we may need some assistance, or a small sample project where the issue can be triggered to further look into it.

Thanks!

@Tony.Zhang 

Any debug/release build

 

adeum {
enabledForDebugBuilds = true
enabledForReleaseBuilds = true
excludeClasses = listOf("android.support.multidex.*", "okio.**")
}

 

Hi @Konstantin.Aksenov,

Can you open a support case by going to www.appdynamics.com/support  that will help us prioritize the research. I will close this for now and add the solution when we have one.

^ Post edited by @Ryan.Paredez to change Support Contact process

Aboubacar Traore

@Aboubacar.Traore @Tony.Zhang I also copy pasted "help@appdynamis.com" from post above. Is it correct or should be "help@appdynamics.com" and message them

Ryan.Paredez
Community Manager

Hi @Konstantin.Aksenov please go to www.appdynamics.com/support

Please report back with the support case ticket # 

 


Thanks,

Ryan, Cisco AppDynamics Community Manager




Found something helpful? Click the Accept as Solution button to help others find answers faster.

Liked something? Click the Thumbs Up button.



Check out Observabiity in Action

new deep dive videos weekly in the Knowledge Base.