标签:android http io os ar java sp on 2014
今天在用robotium对FragmentActivity 测试的时候提示类找不到异常
折腾了半天,最后找到解决方案,把android-support-v4选中去掉就行了.
基类封装
public abstract class BaseInstrumentationTestCase<T extends FragmentActivity> extends ActivityInstrumentationTestCase2<Activity>{ protected Solo solo; @SuppressWarnings({ "rawtypes", "unchecked" }) public BaseInstrumentationTestCase(Class<T> activityClass) { super(((Class)activityClass)); } @Override protected void setUp() throws Exception { solo = new Solo(getInstrumentation(), getActivity()); super.setUp(); } @Override protected void tearDown() throws Exception { solo.finishOpenedActivities(); super.tearDown(); } }
android robotium FragmentActivity
标签:android http io os ar java sp on 2014
原文地址:http://my.oschina.net/u/141149/blog/339220