Dagger: java.lang.NoSuchMethodError: No static method injectMembers(Ldagger/MembersInjector;Ljava/lang/Object;)Ljava/lang/Object; in class Ldagger/internal/MembersInjectors; or its super classes (declaration of 'dagger.internal.MembersInjectors' appears in /data/app/com.vantiv.sampleapp-ph4IrMeN5gRc_AQVG-T7aw==/split_lib_dependencies_apk.apk)

Created on 27 Feb 2019  路  8Comments  路  Source: google/dagger

i have used version "com.google.dagger:dagger:2.21" from "com.google.dagger:dagger:2.11"

compileSdkVersion 28
buildToolsVersion "28.0.3"
minSdkVersion 18
targetSdkVersion 28

java.lang.NoSuchMethodError: No static method injectMembers(Ldagger/MembersInjector;Ljava/lang/Object;)Ljava/lang/Object; in class Ldagger/internal/MembersInjectors; or its super classes (declaration of 'dagger.internal.MembersInjectors' appears in /data/app/com.vantiv.sampleapp-ph4IrMeN5gRc_AQVG-T7aw==/split_lib_dependencies_apk.apk)

build needs more information bug

Most helpful comment

I got the same error, after increased version to latest one fixed the issue.

All 8 comments

That method was removed in version 2.14 because it was unused. But if you build your app again from source, no generated code should use it.

Are there modules in your app that are already built with Dagger?

I have the same error message as well.

minSdkVersion = 21
targetSdkVersion = 28
compileSdkVersion = 28
buildToolsVersion = '28.0.3'

I do however, have one package that uses dagger 2.19, and another that uses dagger 2.11, which does use the injectMembers method. any way to bypass this error?

I have the same error.When i use the version "2.19" , it is no error.But when i use the version "2.20" and "2.21",there will throw this error.

Are there modules in your app that are already built with Dagger?

i have used follwing dependencies and "DaggerVtpDependencyBuilder.class" found from triposmobilesdk.

  • implementation(name: 'triposmobilesdk-release', ext: 'aar')
  • implementation 'com.google.dagger:dagger:2.19'
  • implementation 'org.apache.commons:commons-lang3:3.5'
  • implementation 'commons-io:commons-io:2.5'
  • implementation group: 'commons-validator', name: 'commons-validator', version: '1.6'

Is there a reason you have more than one Dagger version in your app?

Is there a reason you have more than one Dagger version in your app?

i have no more than one Dagger version in my app.

i get the same error when using 2.23..have no idea how to resolve it, tried rebuild, invalidate and restart but still the error persist

No static method injectMembers

using the following dependencies:

implementation 'com.google.dagger:dagger:2.23'
annotationProcessor 'com.google.dagger:dagger-compiler:2.23'
kapt 'com.google.dagger:dagger-compiler:2.23'

I got the same error, after increased version to latest one fixed the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Axrorxoja picture Axrorxoja  路  3Comments

SteinerOk picture SteinerOk  路  3Comments

pedrovarela86 picture pedrovarela86  路  3Comments

SAGARSURI picture SAGARSURI  路  3Comments

peter-tackage picture peter-tackage  路  3Comments