尝试将我的Android应用程序调试为Native时出现以下错误。 我在Windows上运行。我选择Debug As-> Android Native Application
“找不到平台文件(标题和库) 请运行build / tools / build-platforms.sh来构建相应的目录。“
是:我的NDK路径是在Eclipse->偏好设置中设置的。
是:NDK和SDK路径是在PATH env var。
中设置的在网上搜索解决方案后,我遇到了创建错误的init.mk文件,但我无法设计解决方案。 build-platforms.sh不存在。 看起来好像NDK_ROOT没有被whatevers调用构建过程设置?
The platform files were moved in the Android source tree from
$TOP/ndk/build/platforms to $TOP/development/ndk/platforms. However,
the official NDK release packages still place them under the old
location for now, so deal with this here
NDK_PLATFORMS_ROOT := $(strip $(NDK_PLATFORMS_ROOT))
ifndef NDK_PLATFORMS_ROOT
NDK_PLATFORMS_ROOT := $(strip $(wildcard $(NDK_ROOT)/platforms))
ifndef NDK_PLATFORMS_ROOT
NDK_PLATFORMS_ROOT := $(strip $(wildcard $(NDK_ROOT)/build/platforms))
endif
ifndef NDK_PLATFORMS_ROOT
$(call __ndk_info,Could not find platform files (headers and libraries))
$(if $(strip $(wildcard $(NDK_ROOT)/RELEASE.TXT)),\
$(call __ndk_info,Please define NDK_PLATFORMS_ROOT to point to a valid directory.)\
,\
$(call __ndk_info,Please run build/tools/build-platforms.sh to build the corresponding directory.)\
)
$(call __ndk_error,Aborting)
endif
$(call ndk_log,Found platform root directory: $(NDK_PLATFORMS_ROOT))
endif