Method isEmpty in android.text.TextUtils not mocked
解决
在test/java目录下,创建android.text.TextUtils类
package android.text;
public class TextUtils {
public static boolean isEmpty(CharSequence str) {
if (str == null || str.equals("")) {
return true;
}
return false;
}
}
注意
关键是要个TextUtils同包名、同类名、同方法名。