安卓NDK : WARNING: Ignoring unknown import directory: C

标签 android cocos2d-android

I'm working with cocos2dx 2.1.4 ndk-r8e.When I compile the ./build_native.sh I get the error as show I have tryed to solve the solution provide by googling but didnt helped can any one plz point out the problem below: here is image

here is my build_native.sh file :

NDK_ROOT="C:\Users\Documents\Downloads\android-ndk-r8e-windows-x86_64\android-ndk-r8e"
APPNAME="hellowWorld"

# options

buildexternalsfromsource=

usage(){
cat << EOF
usage: $0 [options]

Build C/C++ code for $APPNAME using Android NDK

OPTIONS:
-s  Build externals from source
-h  this help
EOF
}

while getopts "sh" OPTION; do
case "$OPTION" in
s)
buildexternalsfromsource=1
;;
h)
usage
exit 0
;;
esac
done

# paths

if [ -z "${NDK_ROOT+aaa}" ];then
echo "please define NDK_ROOT"
exit 1
fi

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# ... use paths relative to current directory
COCOS2DX_ROOT="C:\Users\monika\AppData\Local\Temp\cocos2d-x-2.1.4\cocos2d-x-2.1.4"
APP_ROOT="C:\Users\monika\AppData\Local\Temp\cocos2d-x-2.1.4\cocos2d-x-2.1.4\monicahello"
APP_ANDROID_ROOT="C:\Users\monika\AppData\Local\Temp\cocos2d-x-2.1.4\cocos2d-x-2.1.4\monicahello\proj.android"

echo "NDK_ROOT = $NDK_ROOT"
echo "COCOS2DX_ROOT = $COCOS2DX_ROOT"
echo "APP_ROOT = $APP_ROOT"
echo "APP_ANDROID_ROOT = $APP_ANDROID_ROOT"

# make sure assets is exist
if [ -d "$APP_ANDROID_ROOT"/assets ]; then
    rm -rf "$APP_ANDROID_ROOT"/assets
fi

mkdir "$APP_ANDROID_ROOT"/assets

# copy resources
for file in "$APP_ROOT"/Resources/*
do
if [ -d "$file" ]; then
    cp -rf "$file" "$APP_ANDROID_ROOT"/assets
fi

if [ -f "$file" ]; then
    cp "$file" "$APP_ANDROID_ROOT"/assets
fi
done

# copy icons (if they exist)
file="$APP_ANDROID_ROOT"/assets/Icon-72.png
if [ -f "$file" ]; then
    cp "$file" "$APP_ANDROID_ROOT"/res/drawable-hdpi/icon.png
fi
file="$APP_ANDROID_ROOT"/assets/Icon-48.png
if [ -f "$file" ]; then
    cp "$file" "$APP_ANDROID_ROOT"/res/drawable-mdpi/icon.png
fi
file="$APP_ANDROID_ROOT"/assets/Icon-32.png
if [ -f "$file" ]; then
    cp "$file" "$APP_ANDROID_ROOT"/res/drawable-ldpi/icon.png
fi


if [[ "$buildexternalsfromsource" ]]; then
    echo "Building external dependencies from source"
    "$NDK_ROOT"/ndk-build -C "$APP_ANDROID_ROOT" $* \
        "NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/source"
else
    echo "Using prebuilt externals"
    "$NDK_ROOT"/ndk-build -C "$APP_ANDROID_ROOT" $* \
        "NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/prebuilt"
fi

最佳答案

我认为提供的路径是错误的,如果您使用的是 windows,那么路径必须是 cygwin 的相对路径,因为它们带有正斜杠 (/) 而不是 windows 中常见的向后 ()。因此,不要从 C 目录添加路径,而是转到 cygwin 并浏览驱动器,然后使用 cd 命令从那里转到文件夹,在您想要类型命令 pwd 路径的目录中,它将为您提供该文件夹的确切路径。将其复制粘贴到此处并完成。

关于安卓NDK : WARNING: Ignoring unknown import directory: C,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17481732/

相关文章:

android - 恢复 fragment 时如何维护在ViewPager中 fragment 的onCreateView中创建的 View 实例?

android - ionic 3 : more than one library with package name 'com.google.android.gms.license'

android - 任务 ':app:compileDebugNdk' 执行失败

java - Admob 没有来自广告服务器的填充 - 无法加载广告 : 3

android - Cocos2d android 中的动画 Sprite

Android - 获取用户从图库中选择的图像的路径

java - 安卓 Activity 导航

android - 在 cocos 2D_android 中从一个场景移动到另一个场景

android - 在Android上使用Cocos2D重复视差

c++ - 我的 cocos2d 游戏启动,比其他音乐应用程序停止