i'm recording my app besed on databanks; while the app starts normally but the test case(even empty test case ) failed
my test is empty
public class LoginActivityTest extends ActivityInstrumentationTestCase2<LoginActivity> { private LoginActivity activity; public LoginActivityTest() { super(LoginActivity.class); } public LoginActivityTest(Class<LoginActivity> activityClass) { super(activityClass); } @Override protected void setUp() throws Exception { super.setUp(); this.activity = getActivity(); } @SmallTest public void testLoginView() throws Throwable { Assert.assertEquals("title", activity.getSupportActionBar().getTitle()); } }
Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation at android.databinding.DataBindingUtil.(DataBindingUtil.java:31) at net.unknown.baziii.us.login.LoginView.onFinishInflate(LoginView.java:52)
while
@Override protected void onFinishInflate() { super.onFinishInflate(); ButterKnife.inject(this, this); mLoginDataBinding = DataBindingUtil.bind(this);// expection at here ..... }
it's seems that test packaged data-binding classes while the app has its origin data-binding classes; the classes redefined. But butterknife and dagger use abstractProcessor to make new code too, they don't have this problem . so could anybody give me a hand ?
Aucun commentaire:
Enregistrer un commentaire