Android Studio 2.2.1 NDK错误:无法在null对象上获取属性'soFolder'

时间:2016-10-16 01:33:21

标签: android android-studio android-ndk

我尝试将现有的NDK C代码与相关的 Link C ++ Project with Gradle 菜单中的新Android Studio 2.2.1相关联,但是我收到以下错误:

错误:无法在null对象上获取属性'soFolder'

我真的不知道是什么导致了这个错误,因为我的原生代码曾经在之前的Android Studio版本中运行良好。

目前我的应用专用gradle文件看起来像这样

gradle file

另外这里是我的mk文件:

Android.mk

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/android-config.mk
LOCAL_CFLAGS :=  -DNO_WINDOWS_BRAINDEATH -DOPENSSL_BN_ASM_MONT -DSHA1_AS 
ifeq ($(TARGET_ARCH),arm) 
    LOCAL_CFLAGS :=$(LOCAL_CFLAGS) -march=armv6 
    LOCAL_SRC_FILES := sha/sha1-armv4-large.S 
endif 
ifeq ($(TARGET_ARCH),x86) 
    LOCAL_CFLAGS :=$(LOCAL_CFLAGS) -msse2 -m32 -march=i686 -mtune=atom 
    LOCAL_SRC_FILES := sha/sha1-586.S
endif 
ifeq ($(TARGET_ARCH),mips) 
    LOCAL_CFLAGS :=$(LOCAL_CFLAGS) -march=mips1
    LOCAL_SRC_FILES := sha/sha1-mips.S
endif 
LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
    sha/sha1dgst.c \
    nativecalc.c \
LOCAL_C_INCLUDES := $(LOCAL_PATH)/includeLocal
LOCAL_LDLIBS := -llog
LOCAL_MODULE:= nativecalc
include $(BUILD_SHARED_LIBRARY)

android-config.mk

LOCAL_CFLAGS += -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN #-DTERMIO
# From DEPFLAG=
LOCAL_CFLAGS += -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CAST -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_SHA0 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_STORE -DOPENSSL_NO_WHIRLPOOL
# Extra
LOCAL_CFLAGS += -DOPENSSL_NO_HW -DOPENSSL_NO_ENGINE -DZLIB
# Debug
# LOCAL_CFLAGS += -DCIPHER_DEBUG

Application.mk

APP_ABI := armeabi x86 mips
APP_PLATFORM := android-9

任何想法如何解决这个问题才能使我的本机代码成功编译?

0 个答案:

没有答案