我为armeabi编译了libcurl.a,armeabi-v7a和x86。我想将它包含在我的android项目中并成功执行此simple code,问题是我不太确定在android.mk和application.mk中写什么来实现它!
到目前为止我写过:Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := com_Hazem_test_Hazem.c
LOCAL_MODULE:= com_Hazem_test_Hazem
include $(BUILD_SHARED_LIBRARY)
Application.mk
APP_ABI := armeabi armeabi-v7a x86
请帮助我弄清楚这两个文件的内容。
答案 0 :(得分:5)
您必须在LOCAL_PATH := $(call my-dir)
之后和使用libcurl
include $(CLEAR_VARS)
LOCAL_MODULE := curl_static
LOCAL_SRC_FILES := <path>/libcurl.a
LOCAL_EXPORT_C_INCLUDES := <path>/curl/include
include $(PREBUILT_STATIC_LIBRARY)
并使用:
LOCAL_STATIC_LIBRARIES += curl_static