Android的bitmap.h未找到本地code编译 [英] Android bitmap.h is not found for native code compile

查看:697
本文介绍了Android的bitmap.h未找到本地code编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译使用Android NDK code。我已经previously用这个code罚款,但它改变了一件事,现在,它不会编译。该数值显示的错误是:

 ++编译大拇指:过滤器< = filters.cpp
C:/Android/my-app//jni/filters.cpp:4:28:致命错误:机器人
/bitmap.h:没有这样的文件或目录
编译终止。
使:*** [C:/ Android的/我的应用// OBJ /本地/ armeabi / OBJ文件/过滤器/
filters.o]错误1

我bitmap.h文件库中所定义的:

 的#include<机器人/ bitmap.h>

我知道bitmap.h是8或更高的目标SKD构建后只有在那里,而我是10的目标和8.任何建议分?这是推动我疯了,用来工作!感谢您的帮助,您可以提供。

编辑:这是我的Andr​​oid.mk文件还

  LOCAL_PATH:= $(叫我-DIR)包括$(CLEAR_VARS)LOCAL_MODULE:=过滤器
LOCAL_SRC_FILES:= filters.cpp
LOCAL_LDLIBS:= -lm -llog -ljnigraphics包括$(BUILD_SHARED_LIBRARY)


解决方案

得到它的工作。我使用SDK工具修订20和平台工具的修订12.为了得到它来编译,我必须指定在命令行(显然这些修订默认为别的什么)APP_PLATFORM。

刚跑:

  NDK的构建APP_PLATFORM =机器人-8

和它内置了!

I am trying to compile code using the Android NDK. I have previously used this code fine, but changed one thing in it and now it will not compile. The error that shows up is:

"Compile++ thumb : filters <= filters.cpp
C:/Android/my-app//jni/filters.cpp:4:28: fatal error: android
/bitmap.h: No such file or directory
compilation terminated.
make: *** [C:/Android/my-app//obj/local/armeabi/objs/filters/
filters.o] Error 1

My bitmap.h file is defined in the library as:

#include <android/bitmap.h>

I know that bitmap.h is only there after a target-skd build of 8 or higher, and mine is a target of 10 and min of 8. Any suggestions? This is driving me crazy and used to work!Thanks for any help you can provide.

Edit: Here is my Android.mk file also

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := filters
LOCAL_SRC_FILES := filters.cpp
LOCAL_LDLIBS    := -lm -llog -ljnigraphics

include $(BUILD_SHARED_LIBRARY)

解决方案

Got it to work. I was using SDK tools revision 20, and platform-tools revision 12. In order to get it to compile, I had to specify the APP_PLATFORM in the command line (apparently these revisions default to something else).

Just ran:

ndk-build APP_PLATFORM=android-8

and it built!

这篇关于Android的bitmap.h未找到本地code编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆