close

[Solved] AbstractDynamicObject$CustomMessageMissingMethodException error in android

Hello Guys, How are you all? Hope You all Are Fine. Today I got AbstractDynamicObject$CustomMessageMissingMethodException error in Android. So Here I am Explain to you all the possible solutions here.

Without Wasting your time, Lets start This Article to Solve This Error.

How AbstractDynamicObject$CustomMessageMissingMethodException Error Occurs ?

Today I am trying to connect firebase with my project. When, I tried to connect to Firebase I got the error: AbstractDynamicObject$CustomMessageMissingMethodException.

Full stack trace:

   Caused by: java.lang.RuntimeException: com.android.build.gradle.internal.crash.ExternalApiUsageException: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method setVariantDir() for arguments [debug] on task ':app:processDebugGoogleServices' of type com.google.gms.googleservices.GoogleServicesTask.
        at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:71)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:54)
    at com.android.build.gradle.internal.profile.AnalyticsResourceManager.recordBlockAtConfiguration(AnalyticsResourceManager.kt:206)
    at com.android.build.gradle.internal.profile.AnalyticsConfiguratorService.recordBlock(AnalyticsConfiguratorService.kt:85)
    at com.android.build.gradle.internal.plugins.BasePlugin.lambda$createTasks$9(BasePlugin.java:582)
    at com.android.build.gradle.internal.crash.CrashReporting$afterEvaluate$1.execute(crash_reporting.kt:37)
    at com.android.build.gradle.internal.crash.CrashReporting$afterEvaluate$1.execute(crash_reporting.kt)

How To Solve AbstractDynamicObject$CustomMessageMissingMethodException Error ?

Question: How To Solve AbstractDynamicObject$CustomMessageMissingMethodException Error ?
Answer: The problem is com.google.gms:google-services:4.3.6 when so the solution, for now, is to downgrade google-service to 4.3.5 just follow below Step. Open build.gradle file. In the dependencies please downgrade google-service to 4.3.5. As like below. Then Gradle sync. The error should be goes away for you. This solution worked for me. Hopefully this solution worked for you too.

Solution 1

The problem is com.google.gms:google-services:4.3.6 when so the solution, for now, is to downgrade google-service to 4.3.5 just follow below Step.

  • Open build.gradle file.
  • In the dependencies please downgrade google-service to 4.3.5. As like below.
classpath 'com.google.gms:google-services:4.3.6'

Change it to

classpath 'com.google.gms:google-services:4.3.5'
  • Then Gradle sync.

The error should be goes away for you. This solution worked for me. Hopefully this solution worked for you too.

Solution 2

Update google services to 4.3.6 and also make these updates (desktop):

  1. Gradle version: 7.0
  2. Android Studio version: 4.2.0 stable
  3. Plugin name and version: google-service:4.3.6

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment