我尝试将protobuf
称为Android模块,首先我使用模块项目文件夹配置变量NDK_MODULE_PATH
,并在Android.mk
中调用$ (call import-module, protobuf)
:
LOCAL_PATH := $(call my-dir)
$(call import-module, protobuf)
include $(CLEAR_VARS)
#...
但它给了我一个错误:
Android NDK: Trying to define local module 'protobuf-cpp-lite' in /home/alex/Projects/network-simulator/3rd-party/protobuf/Android.mk.
Android NDK: But this module was already defined by /home/alex/Projects/network-simulator/3rd-party/protobuf/Android.mk.
/opt/android-ndk-r10/build/core/build-module.mk:34: *** Android NDK: Aborting. . Stop.
当我尝试在其文件夹中单独构建protobuf
时,我遇到了同样的错误。