Android NDK Samples无法找到头文件

时间:2015-11-18 03:53:17

标签: android eclipse android-ndk

我正在尝试查看使用Android NDK的OpenARToolkit Android SDK的源代码。它目前只适用于旧的Eclipse IDE,工作起来非常痛苦。我在Eclipse的最新版本和JDK 1.8.0_66上使用Ubuntu 5.10,包含所有最新的SDK和NDK文件。

这是我的PATH变量的样子:

    seth@seth-P65-P67SE:~/android-ndk-r10e$ echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/seth/android-ndk-r10e

我正在尝试运行示例NDK应用程序HelloJni,无论我做什么,编译器都找不到任何标准头文件。 jni.h,string.h等。

我没有使用Android的经验;我只想尝试使用OpenARToolkit中的图像处理算法。

如果您有任何想法,我将非常感激。

编辑:这是ndk-build V = 1

的输出
:~/workspace/HelloJni$ ndk-build V=1
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 3 in ./AndroidManifest.xml    
rm -f ./libs/arm64-v8a/lib*.so ./libs/armeabi/lib*.so ./libs/armeabi-v7a/lib*.so ./libs/armeabi-v7a-hard/lib*.so ./libs/mips/lib*.so ./libs/mips64/lib*.so ./libs/x86/lib*.so ./libs/x86_64/lib*.so
rm -f ./libs/arm64-v8a/gdbserver ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/armeabi-v7a-hard/gdbserver ./libs/mips/gdbserver ./libs/mips64/gdbserver ./libs/x86/gdbserver ./libs/x86_64/gdbserver
rm -f ./libs/arm64-v8a/gdb.setup ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/armeabi-v7a-hard/gdb.setup ./libs/mips/gdb.setup ./libs/mips64/gdb.setup ./libs/x86/gdb.setup ./libs/x86_64/gdb.setup
[arm64-v8a] Gdbserver      : [aarch64-linux-android-4.9] libs/arm64-v8a/gdbserver
install -p /home/seth/android-ndk-r10e/prebuilt/android-arm64/gdbserver/gdbserver ./libs/arm64-v8a/gdbserver
[arm64-v8a] Gdbsetup       : libs/arm64-v8a/gdb.setup
echo "set solib-search-path ./obj/local/arm64-v8a" > ./libs/arm64-v8a/gdb.setup
echo "source /home/seth/android-ndk-r10e/prebuilt/common/gdb/common.setup" >> ./libs/arm64-v8a/gdb.setup
echo "directory /home/seth/android-ndk-r10e/platforms/android-21/arch-arm64/usr/include jni /home/seth/android-ndk-r10e/sources/cxx-stl/system" >> ./libs/arm64-v8a/gdb.setup
[x86_64] Gdbserver      : [x86_64-4.9] libs/x86_64/gdbserver
install -p /home/seth/android-ndk-r10e/prebuilt/android-x86_64/gdbserver/gdbserver ./libs/x86_64/gdbserver
[x86_64] Gdbsetup       : libs/x86_64/gdb.setup
echo "set solib-search-path ./obj/local/x86_64" > ./libs/x86_64/gdb.setup
echo "source /home/seth/android-ndk-r10e/prebuilt/common/gdb/common.setup" >> ./libs/x86_64/gdb.setup
echo "directory /home/seth/android-ndk-r10e/platforms/android-21/arch-x86_64/usr/include jni /home/seth/android-ndk-r10e/sources/cxx-stl/system" >> ./libs/x86_64/gdb.setup
[mips64] Gdbserver      : [mips64el-linux-android-4.9] libs/mips64/gdbserver
install -p /home/seth/android-ndk-r10e/prebuilt/android-mips64/gdbserver/gdbserver ./libs/mips64/gdbserver
[mips64] Gdbsetup       : libs/mips64/gdb.setup
echo "set solib-search-path ./obj/local/mips64" > ./libs/mips64/gdb.setup
echo "source /home/seth/android-ndk-r10e/prebuilt/common/gdb/common.setup" >> ./libs/mips64/gdb.setup
echo "directory /home/seth/android-ndk-r10e/platforms/android-21/arch-mips64/usr/include jni /home/seth/android-ndk-r10e/sources/cxx-stl/system" >> ./libs/mips64/gdb.setup
[armeabi-v7a] Gdbserver      : [arm-linux-androideabi-4.8] libs/armeabi-v7a/gdbserver
install -p /home/seth/android-ndk-r10e/prebuilt/android-arm/gdbserver/gdbserver ./libs/armeabi-v7a/gdbserver
[armeabi-v7a] Gdbsetup       : libs/armeabi-v7a/gdb.setup
echo "set solib-search-path ./obj/local/armeabi-v7a" > ./libs/armeabi-v7a/gdb.setup
echo "source /home/seth/android-ndk-r10e/prebuilt/common/gdb/common.setup" >> ./libs/armeabi-v7a/gdb.setup
echo "directory /home/seth/android-ndk-r10e/platforms/android-19/arch-arm/usr/include jni /home/seth/android-ndk-r10e/sources/cxx-stl/system" >> ./libs/armeabi-v7a/gdb.setup
[armeabi] Gdbserver      : [arm-linux-androideabi-4.8] libs/armeabi/gdbserver
install -p /home/seth/android-ndk-r10e/prebuilt/android-arm/gdbserver/gdbserver ./libs/armeabi/gdbserver
[armeabi] Gdbsetup       : libs/armeabi/gdb.setup
echo "set solib-search-path ./obj/local/armeabi" > ./libs/armeabi/gdb.setup
echo "source /home/seth/android-ndk-r10e/prebuilt/common/gdb/common.setup" >> ./libs/armeabi/gdb.setup
echo "directory /home/seth/android-ndk-r10e/platforms/android-19/arch-arm/usr/include jni /home/seth/android-ndk-r10e/sources/cxx-stl/system" >> ./libs/armeabi/gdb.setup
[x86] Gdbserver      : [x86-4.8] libs/x86/gdbserver
install -p /home/seth/android-ndk-r10e/prebuilt/android-x86/gdbserver/gdbserver ./libs/x86/gdbserver
[x86] Gdbsetup       : libs/x86/gdb.setup
echo "set solib-search-path ./obj/local/x86" > ./libs/x86/gdb.setup
echo "source /home/seth/android-ndk-r10e/prebuilt/common/gdb/common.setup" >> ./libs/x86/gdb.setup
echo "directory /home/seth/android-ndk-r10e/platforms/android-19/arch-x86/usr/include jni /home/seth/android-ndk-r10e/sources/cxx-stl/system" >> ./libs/x86/gdb.setup
[mips] Gdbserver      : [mipsel-linux-android-4.8] libs/mips/gdbserver
install -p /home/seth/android-ndk-r10e/prebuilt/android-mips/gdbserver/gdbserver ./libs/mips/gdbserver
[mips] Gdbsetup       : libs/mips/gdb.setup
echo "set solib-search-path ./obj/local/mips" > ./libs/mips/gdb.setup
echo "source /home/seth/android-ndk-r10e/prebuilt/common/gdb/common.setup" >> ./libs/mips/gdb.setup
echo "directory /home/seth/android-ndk-r10e/platforms/android-19/arch-mips/usr/include jni /home/seth/android-ndk-r10e/sources/cxx-stl/system" >> ./libs/mips/gdb.setup
[arm64-v8a] Compile        : hello-jni <= hello-jni.c
/home/seth/android-ndk-r10e/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc -MMD -MP -MF ./obj/local/arm64-v8a/objs-debug/hello-jni/hello-jni.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -O2 -g -DNDEBUG -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -O0 -UNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing -Ijni -DANDROID  -Wa,--noexecstack -Wformat -Werror=format-security    -I/home/seth/android-ndk-r10e/platforms/android-21/arch-arm64/usr/include -c  jni/hello-jni.c -o ./obj/local/arm64-v8a/objs-debug/hello-jni/hello-jni.o 
jni/hello-jni.c:17:20: fatal error: string.h: No such file or directory
 #include <string.h>
                    ^
compilation terminated.
make: *** [obj/local/arm64-v8a/objs-debug/hello-jni/hello-jni.o] Error 1

0 个答案:

没有答案