我建立了依赖于tensorflow的Arm NN共享库,而tensorflow依赖于protobuf。 成功构建后,我将所有这样的库(libprotobuf.so,libarmnnTfParser.so,libarmnn.so ....)放入我的3rdparty中,并尝试使用android studio apk进行构建以在Pixel 2上运行。我在build中使用task .gradle将* .so复制到jniLibs中,然后复制到apk中。 在启动时运行apk崩溃期间: 附加的logcat
10-12 19:52:57.221 11717-11732/XXX E/libprotobuf-native: [libprotobuf ERROR external/protobuf_archive/src/google/protobuf/descriptor_database.cc:58] File already exists in database: google/protobuf/any.proto
10-12 19:52:57.221 11717-11732/XXX A/libprotobuf-native: [libprotobuf FATAL external/protobuf_archive/src/google/protobuf/descriptor.cc:1404] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
terminating.
10-12 19:52:57.222 11717-11732/XXX E/libc++abi: terminating with uncaught exception of type google::protobuf::FatalException: CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
10-12 19:52:57.222 11717-11732/XXX A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 11732 (roidJUnitRunner), pid 11717 (henticator.test)
10-12 19:52:57.246 11765-11765/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
10-12 19:52:57.246 825-825/? I//system/bin/tombstoned: received crash request for pid 11717
10-12 19:52:57.247 11765-11765/? I/crash_dump64: performing dump of process 11717 (target tid = 11732)
10-12 19:52:57.247 11765-11765/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Android/aosp_walleye/walleye:8.1.0/OPM2.171026.006.G1/admini08281518:userdebug/test-keys'
Revision: 'MP1'
ABI: 'arm64'
pid: 11717, tid: 11732, name: roidJUnitRunner >>> XXX <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
10-12 19:52:57.250 11765-11765/? A/DEBUG: Abort message: '[libprotobuf FATAL external/protobuf_archive/src/google/protobuf/descriptor.cc:1404] CHECK failed: generated_database_->Add(encoded_file_descriptor, size): '
x0 0000000000000000 x1 0000000000002dd4 x2 0000000000000006 x3 0000000000000008
我从3.6.1版的源代码编译了protobbuf。 在android 8.1 Pixel 2上运行。
是否存在另一种与libprotobuf.so链接的方式,或者我错过了一些东西 寻求帮助