我该如何解决这个问题:
在线 “导入android.support.test.rule.ActivityTestRule;” “规则”一词为红色
以及“ ActivityTestRule”这两个字也是红色
public ActivityTestRule mActivityRule =新的ActivityTestRule(AuthorizationPresenter.class);
package by.hjhj;
import android.support.test.espresso.NoMatchingViewException;
import android.support.test.rule.ActivityTestRule;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import by.belinvestbank.presenter.authorization.AuthorizationPresenter;
public class Authorization {
@Rule
public ActivityTestRule<AuthorizationPresenter> mActivityRule = new ActivityTestRule(AuthorizationPresenter.class);
@Before
public void SetUp()throws Exception{
Thread.sleep(4000);
try {
onView(allOf(withId(R.id.login),(isDisplayed()))).check(matches(isDisplayed()));
}
catch (NoMatchingViewException e) {
pressBack();
}
}
}