[NDK_PROJECT_PATH=空]。无法解决与 PARALLEL-SPACE 相关的示例项目中的 Android-NDK 错误
[NDK_PROJECT_PATH=null]. Not able to resolve Android-NDK error from a sample project related to PARALLEL-SPACE
错误日志
External native generate JSON release: executing ndkBuild Executable :
/Users/nidhinagvanshi/Library/Android/sdk/ndk/20.0.5594570/ndk-build
arguments : NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/src/main/jni/Android.mk
NDK_APPLICATION_MK=/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/src/main/jni/Application.mk
APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-16
NDK_OUT=/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/build/intermediates/ndkBuild/release/obj
NDK_LIBS_OUT=/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/build/intermediates/ndkBuild/release/lib
APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false
-n jvmArgs :
/Users/nidhinagvanshi/Library/Android/sdk/ndk/20.0.5594570/build/core/add-application.mk:178:
*** Android NDK: APP_STL gnustl_static is no longer supported. Please switch to either c++_static or c++_shared. See
https://developer.android.com/ndk/guides/cpp-support.html for more
information. . Stop. External native generate JSON release: using
platform version 16 for ABI ARMEABI_V7A and min SDK version 14
External native generate JSON release: rebuilding JSON
/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json
due to: External native generate JSON release: - expected json
/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json
file is not present, will remove stale json folder External native
generate JSON release: - missing previous command file
/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_command.txt,
will remove stale json folder
Android.mk
LOCAL_PATH := $(call my-dir)
MAIN_LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := va++
LOCAL_CFLAGS := -Wno-error=format-security -fpermissive -DLOG_TAG=\"VA++\"
LOCAL_CFLAGS += -fno-rtti -fno-exceptions
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH)
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH)/Foundation
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH)/Jni
LOCAL_SRC_FILES := Jni/VAJni.cpp \
Foundation/IOUniformer.cpp \
Foundation/VMPatch.cpp \
Foundation/SymbolFinder.cpp \
Foundation/Path.cpp \
Foundation/SandboxFs.cpp \
Substrate/hde64.c \
Substrate/SubstrateDebug.cpp \
Substrate/SubstrateHook.cpp \
Substrate/SubstratePosixMemory.cpp \
LOCAL_LDLIBS := -llog -latomic
LOCAL_STATIC_LIBRARIES := fb
include $(BUILD_SHARED_LIBRARY)
include $(MAIN_LOCAL_PATH)/fb/Android.mk
local.properties
#Sat May 08 22:01:39 IST 2021 sdk.dir=/Users/nidhinagvanshi/Library/Android/sdk
ndk.dir=/Users/nidhinagvanshi/Library/Android/sdk/ndk/20.0.5594570
我通过降级 NDK 解决了这个错误。 local.properties 中更改了以下行:
ndk.dir=/Users/nidhinagvanshi/Library/Android/sdk/ndk/17.2.4988734
错误日志
External native generate JSON release: executing ndkBuild Executable : /Users/nidhinagvanshi/Library/Android/sdk/ndk/20.0.5594570/ndk-build arguments : NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/src/main/jni/Android.mk NDK_APPLICATION_MK=/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/src/main/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=/Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/build/intermediates/ndkBuild/release/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false
-n jvmArgs :
/Users/nidhinagvanshi/Library/Android/sdk/ndk/20.0.5594570/build/core/add-application.mk:178: *** Android NDK: APP_STL gnustl_static is no longer supported. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information. . Stop. External native generate JSON release: using platform version 16 for ABI ARMEABI_V7A and min SDK version 14 External native generate JSON release: rebuilding JSON /Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json due to: External native generate JSON release: - expected json /Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json file is not present, will remove stale json folder External native generate JSON release: - missing previous command file /Users/nidhinagvanshi/Downloads/VirtualApp-master-2/VirtualApp/lib/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_command.txt, will remove stale json folder
Android.mk
LOCAL_PATH := $(call my-dir)
MAIN_LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := va++
LOCAL_CFLAGS := -Wno-error=format-security -fpermissive -DLOG_TAG=\"VA++\"
LOCAL_CFLAGS += -fno-rtti -fno-exceptions
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH)
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH)/Foundation
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH)/Jni
LOCAL_SRC_FILES := Jni/VAJni.cpp \
Foundation/IOUniformer.cpp \
Foundation/VMPatch.cpp \
Foundation/SymbolFinder.cpp \
Foundation/Path.cpp \
Foundation/SandboxFs.cpp \
Substrate/hde64.c \
Substrate/SubstrateDebug.cpp \
Substrate/SubstrateHook.cpp \
Substrate/SubstratePosixMemory.cpp \
LOCAL_LDLIBS := -llog -latomic
LOCAL_STATIC_LIBRARIES := fb
include $(BUILD_SHARED_LIBRARY)
include $(MAIN_LOCAL_PATH)/fb/Android.mk
local.properties
#Sat May 08 22:01:39 IST 2021 sdk.dir=/Users/nidhinagvanshi/Library/Android/sdk ndk.dir=/Users/nidhinagvanshi/Library/Android/sdk/ndk/20.0.5594570
我通过降级 NDK 解决了这个错误。 local.properties 中更改了以下行:
ndk.dir=/Users/nidhinagvanshi/Library/Android/sdk/ndk/17.2.4988734