Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't implement activity scenario

I found in Google Example instrumented test something like this:

@Before
public void launchActivity() {
  ActivityScenario.launch(MainActivity.class);
}

But i can't implemented ActivityScenario in my project. I should add something to gradle or what ?

If I past import androidx.test.core.app.ActivityScenario; no help, i have test red in AndroidStudio.

How to implement AndroidScenario ?

like image 223
purcha Avatar asked Oct 18 '18 14:10

purcha


1 Answers

Try adding androidx.test:core:<currentVersion> dependency to your gradle.

Like "androidx.test:core:1.0.0-beta02" or whatever the current version is.

like image 147
Mikhail Olshanski Avatar answered Oct 02 '22 06:10

Mikhail Olshanski