hb0
hb0

Reputation: 3737

Robolectric 4 AndroidX NoClassDefFoundError MonitoringInstrumentation with IntelliJ 2018.3.4

Problem

No duplicate question:

I read the other topics which pop up when using google or stackoverflow search but they are about a more specific error which is worked-around via adding specific dependencies. In my case I was not able to determine which dependency to add.

Upvotes: 1

Views: 1025

Answers (2)

Davide
Davide

Reputation: 3472

I add dependencies to androidx.test:core for the build type under test.

In my case it was debug so in the build.gradle I add

debugImplementation 'androidx.test:core:1.2.0'

Upvotes: 1

hb0
hb0

Reputation: 3737

I read that no workaround should be required with Android Studio 3.3 and Robolectric 4.0.

  • Use Android Studio 3.3.1+ with Robolectric 4.0+

This works for me.

Upvotes: 0

Related Questions