Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

524
Vistas
Android Espresso test error: No static method loadSingleServiceOrNull()

When I ran my tests 1 week ago every was fine, but now I get this error:

java.lang.NoSuchMethodError: No static method loadSingleServiceOrNull(Ljava/lang/Class;)Ljava/lang/Object; in class Landroidx/test/internal/platform/ServiceLoaderWrapper; or its super classes (declaration of 'androidx.test.internal.platform.ServiceLoaderWrapper' appears in /data/app/com.domain.myapp-1/base.apk)
at androidx.test.espresso.base.UiControllerModule.provideUiController(UiControllerModule.java:2)
at androidx.test.espresso.base.UiControllerModule_ProvideUiControllerFactory.provideUiController(UiControllerModule_ProvideUiControllerFactory.java:1)
at androidx.test.espresso.base.UiControllerModule_ProvideUiControllerFactory.get(UiControllerModule_ProvideUiControllerFactory.java:1)
at androidx.test.espresso.base.UiControllerModule_ProvideUiControllerFactory.get(UiControllerModule_ProvideUiControllerFactory.java:2)
at androidx.test.espresso.core.internal.deps.dagger.internal.DoubleCheck.get(DoubleCheck.java:6)
at androidx.test.espresso.DaggerBaseLayerComponent$ViewInteractionComponentImpl.viewInteraction(DaggerBaseLayerComponent.java:1)
at androidx.test.espresso.Espresso.onView(Espresso.java:1)

This line throws error:

onView(withId(R.id.sign_in_button)).perform(click())

What could be the cause? Thank you.

over 4 years ago · Hanz Gallego
2 Respuestas
Responde la pregunta

0

Issue occurred to me when I updated

androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

to

androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

Reverting to version 3.3.0 fixed things.

over 4 years ago · Hanz Gallego Denunciar

0

You have multiple ServiceLoaderWrapper, the one that actually has the API method is some of them, This file is brought by androidx.test:monitor, I fixed it by forcing the version of the package in the app gradle file as following.

android {
  ...
  configurations.all {
    resolutionStrategy {
        force 'androidx.test:monitor:1.4.0'
     }
  }
  ...
}
over 4 years ago · Hanz Gallego Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda