本帖最后由 anywhereyang 于 2021-2-1 17:41 编辑
报错如下:
art/runtime/native/dalvik_system_DexFile.cc:492: error: undefined reference to 'art::ScopedFastNativeObjectAccess::ScopedFastNativeObjectAccess(_JNIEnv*)'
clang.real: error: linker command failed with exit code 1 (use -v to see invocation)
[ 0% 26/23412] //art/runtime:libart c...ounting/mod_union_table.cc [linux x86]
ninja: build stopped: subcommand failed.
16:23:09 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
代码位置dalvik_system_DexFile.cc:
[C] 纯文本查看 复制代码 static void DexFile_dumpMethodCode(JNIEnv* env, jclass,jobject method) {
if(method!=nullptr && env != nullptr)
{
ScopedFastNativeObjectAccess soa(env); ////////////////这里是报错位置
ArtMethod* artmethod = ArtMethod::FromReflectedMethod(soa, method);
// ArtMethod *artmethod = jobject2ArtMethod( env,method);
myfartInvoke(artmethod);
}
return;
}
已经在文件的开始位置包含了头文件
#include "scoped_fast_native_object_access.h"
有编译过的朋友有遇到这个问题吗
|