android studio:android sdk符号未解析,但androidTest OK

时间:2018-03-01 01:23:07

标签: android android-studio sdk

androidTest:使用API​​级别为26的模拟器传递测试

如果从android studio运行,使用相同的模拟器调用相同的代码,则会发生错误。

来自调试,java.util.regex.Pattern

private void compile() throws PatternSyntaxException {
    if (pattern == null) {
        throw new NullPointerException("pattern == null");
    }

    String icuPattern = pattern;
    if ((flags & LITERAL) != 0) {
        icuPattern = quote(pattern);
    }

    // These are the flags natively supported by ICU.
    // They even have the same value in native code.
    int icuFlags = flags & (CASE_INSENSITIVE | COMMENTS | MULTILINE | DOTALL | UNIX_LINES);
    address = compileImpl(icuPattern, icuFlags);
    registry.registerNativeAllocation(this, address);   <<-------this line error
}

Android工作室编辑器在鼠标悬停时显示错误:

     registerNativeAllocation can not be resolved.

为什么androidTest没有这个问题。这是lib兼容性问题吗?

0 个答案:

没有答案