我的.apk成功加载到我的Android设备,这是华为Y6。我使用clang作为我的编译器,我从命令行编译。但是,当我启动它时,我得到一个读取
的SDL错误SDL Error
An error occurred while trying to start the application. Please try again and
or reinstall.
Error:
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.tutorial.game-2/base.apk"], nativeLibraryDirectories=[/vendor/lib,/system/lib]]] couldn't find "libc++_shared.so"
我不确定为什么会这样,因为当我运行我的ndk-build时,我收到这些消息:
[armeabi] Install : libc++_shared.so => libs/armeabi/libc++_shared.so
[armeabi-v7a] Install : libc++_shared.so => libs/armeabi-v7a/libc++_shared.so
[x86] Install : libc++_shared.so => libs/x86/libc++_shared.so
这是我的Application.mk
APP_STL := c++_shared
#LIBCXX_FORCE_REBUILD := true
APP_OPTIM := release
APP_CPPFLAGS += -frtti
APP_CPPFLAGS += -fexceptions
APP_ABI := armeabi armeabi-v7a x86
APP_MODULES := main
# Min SDK level
APP_PLATFORM=android-18
NDK_TOOLCHAIN_VERSION := clang
这是我的Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := main
SDL_PATH := ../SDL2
LOCAL_CPPFLAGS += -fexceptions -std=c++14 -DGLEW_NO_GLU -D_ANDROID_ -DGL_GLEXT_PROTOTYPES
# -Wall
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include \
$(LOCAL_PATH)/$(SDL_PATH)/include $(LOCAL_PATH)/../SDL2_image \
$(LOCAL_PATH)/../common/include
# Add your application source files here...
LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \
Source.cpp
LOCAL_SHARED_LIBRARIES := SDL2 SDL2_mixer SDL2_image
LOCAL_STATIC_LIBRARIES := freetype2-static
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv3 -llog -lz
include $(BUILD_SHARED_LIBRARY)
我不清楚libc ++ _ shared.so是什么意思找不到。有人可以解释一下我应该在这做什么吗?