文档章节

How to include <android/bitmap.h> and other *.h NDK libraries to Titanium Android module?

We911
 We911
发布于 2017/02/08 10:16
字数 735
阅读 67
收藏 0

I am facing problem in including built in NDK libraries such as (bitmap.h , log.h and others) to my Native C++ Code of Titanium android Module . problem as show in following figure . 

In Figure when i add any library such as #include<android/bitmap.h> as show above picture ,A little yellow Question mark appear on the left side which means "Unresolved inclusion" .How to Fix it ?

NOTE : As this problem can be fix in eclipse android project but i am unable to solve this issue in Titanium android Module project

One solution which i found on Internet is to mention graphics libraries to Android.mk file as show below :

LOCAL_PATH := $(call my-dir)
 
include $(CLEAR_VARS)
 
LOCAL_MODULE    := IMGprocessing
LOCAL_SRC_FILES := IMGprocessing.cpp
 
LOCAL_LDLIBS := -ljnigraphics
include $(BUILD_SHARED_LIBRARY)
BUT still i am getting Error Messages That "<android/bitmap.h> there is no such file or directory " when i Build my android Titanium module through Ant after successfully compile my Native C++ Code through cygwin to generated binaries ... Error messages are as shown below :
[exec] "Compile++ thumb : IMGprocessing <= IMGprocessing.cpp
     [exec] jni/IMGprocessing.cpp:4:28: error: android/bitmap.h: No such file or
 directory
     [exec] jni/IMGprocessing.cpp:9:12: warning: missing whitespace after the ma
cro name
     [exec] jni/IMGprocessing.cpp: In function 'void Java_com_nextin_imagemanipu
lation_ImageProcessing_HistogramEqualization(JNIEnv*, _jobject*, _jobject*, _job
ject*)':
     [exec] jni/IMGprocessing.cpp:20: error: 'AndroidBitmapInfo' was not declare
d in this scope
     [exec] jni/IMGprocessing.cpp:20: error: expected ';' before 'info_orignal'
     [exec] jni/IMGprocessing.cpp:22: error: expected ';' before 'info_new'
     [exec] jni/IMGprocessing.cpp:27: error: 'uint32_t' was not declared in this
 scope
     [exec] jni/IMGprocessing.cpp:27: error: 'line_orignal' was not declared in
this scope
     [exec] jni/IMGprocessing.cpp:28: error: 'line_new' was not declared in this
 scope
     [exec] jni/IMGprocessing.cpp:33: error: 'info_orignal' was not declared in
this scope
     [exec] jni/IMGprocessing.cpp:33: error: 'AndroidBitmap_getInfo' was not dec
lared in this scope
     [exec] jni/IMGprocessing.cpp:38: error: 'info_orignal' was not declared in
this scope
     [exec] jni/IMGprocessing.cpp:38: error: 'ANDROID_BITMAP_FORMAT_RGBA_8888' w
as not declared in this scope
     [exec] jni/IMGprocessing.cpp:42: error: 'AndroidBitmap_lockPixels' was not
declared in this scope
     [exec] jni/IMGprocessing.cpp:46: error: 'info_new' was not declared in this
 scope
     [exec] jni/IMGprocessing.cpp:46: error: 'AndroidBitmap_getInfo' was not dec
lared in this scope
     [exec] jni/IMGprocessing.cpp:51: error: 'info_new' was not declared in this
 scope
     [exec] jni/IMGprocessing.cpp:51: error: 'ANDROID_BITMAP_FORMAT_RGBA_8888' w
as not declared in this scope
     [exec] jni/IMGprocessing.cpp:55: error: 'AndroidBitmap_lockPixels' was not
declared in this scope
     [exec] jni/IMGprocessing.cpp:60: error: 'AndroidBitmap_unlockPixels' was no
t declared in this scope
     [exec] jni/IMGprocessing.cpp:66: error: 'info_orignal' was not declared in
this scope
     [exec] jni/IMGprocessing.cpp:67: error: expected primary-expression before
')' token
     [exec] jni/IMGprocessing.cpp:67: error: expected ';' before 'pixels_orignal
'
     [exec] jni/IMGprocessing.cpp:94: error: 'info_orignal' was not declared in
this scope
     [exec] jni/IMGprocessing.cpp:139: error: 'AndroidBitmap_lockPixels' was not
 declared in this scope
     [exec] jni/IMGprocessing.cpp:144: error: expected primary-expression before
 ')' token
     [exec] jni/IMGprocessing.cpp:144: error: expected ';' before 'pixels_origna
l'
     [exec] jni/IMGprocessing.cpp:145: error: expected primary-expression before
 ')' token
     [exec] jni/IMGprocessing.cpp:145: error: expected ';' before 'pixels_new'
     [exec] jni/IMGprocessing.cpp:164: error: 'info_new' was not declared in thi
s scope
     [exec] jni/IMGprocessing.cpp:172: error: 'AndroidBitmap_lockPixels' was not
 declared in this scope
     [exec] make: *** [C:\Users\Haris\AppData\Local\Temp\/Haris/imagemanipulatio
n-generated/obj/local/armeabi/objs/IMGprocessing/IMGprocessing.o] Error 1
     [move] Moving 4 files to D:\Nextin_Company_Workspace\Workspace_Titanium\Ima
geManipulation\build\generated\jni-local
 
BUILD FAILED
C:\Users\Haris\AppData\Roaming\Titanium\mobilesdk\win32\3.0.2.GA\module\android\
build.xml:410: D:\Nextin_Company_Workspace\Workspace_Titanium\ImageManipulation\
build\generated\jni-local\libs does not exist.
 
Total time: 26 seconds
Please Help me out .. Thanks in advance .

My Environment Details are as follow:

Windows 8 64bit Professional Titanium Studio, build: 3.0.1 Python27 apache-ant-1.8.4

— asked 10 months ago by  Muhammad Haris Baig
1 Comment
  • >NOTE : As this problem can be fix in eclipse android project but i am unable to solve this issue in Titanium android Module project

    How do you fix this in Eclipse Android ?

    — commented 10 months ago by Francois Stephany

1 Answer

0 votes

SOLVED : i got the solution that how can i fix this issue in Titanium studio with Native module development.. just go to NDK Project->New->Folder->Advanced->Link to alternate location(Linked Folder) Browse the path?for example)?C:\Android\android-ndk-r8b\platforms\android-8\arch-arm\usr\include

and then click ok !! This will fix unresolved inclusion Problem :)

本文转载自:http://blog.csdn.net/liduanw/article/details/17115671

共有 人打赏支持
We911
粉丝 1
博文 63
码字总数 0
作品 0
深圳
程序员
Build ffmpeg with NDK r9(转载)

How to Build ffmpeg with NDK r9 by ROMAN10 on AUGUST 18, 2013 · 52 COMMENTS This is a updated post for a previous post, where we built ffmpeg 0.8 with Android NDK r5 and r6. Th......

老牛吃嫩草
2014/03/13
0
0
How to Build ffmpeg with NDK r9

This is a updated post for a previous post, where we built ffmpeg 0.8 with Android NDK r5 and r6. This post will give instructions of how to build ffmpeg 2.0.1 with Android NDK ......

wape-yang
2014/06/14
0
0
深入了解android平台的jni---编译ffmpeg源码

环境: 操作系统:Ubuntu 10.04 ffmpeg源码版本:ffmpeg-0.6.1 android ndk版本:android-ndk-r5b-linux-x86 目的: 用来了解ffmpeg源码的编译场景和编译过程 准备工作: 将android-ndk-r5b解压...

mfcai
2013/08/18
0
0
Android: NDK编程入门笔记

为何要用到NDK? 概括来说主要分为以下几种情况: 1. 代码的保护,由于apk的java层代码很容易被反编译,而C/C++库反汇难度较大。 2. 在NDK中调用第三方C/C++库,因为大部分的开源库都是用C/C...

gongweixin
2013/04/23
0
3
Android: NDK编程入门笔记

为何要用到NDK? 概括来说主要分为以下几种情况: 1. 代码的保护,由于apk的java层代码很容易被反编译,而C/C++库反汇难度较大。 2. 在NDK中调用第三方C/C++库,因为大部分的开源库都是用C/C...

xubohui
2012/08/20
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

springmvc入门之映射处理器(一)

1.简析映射处理器 在spring mvc中,使用映射处理器可以把web请求映射到正确的处理器上,spring内置了很多映射处理器,而且我们也可以自定义映射处理器。下面的实例展示spring中最常用的两个映...

明理萝
1分钟前
0
1
一个破碎的人,窃机浪漫飞行后自由坠毁

简评:A sick man who needs treatment 29 岁的 Richard Russell 是西雅图机场地勤人员,上周五,在刚进入秋天的日子,他偷了一架未载客的飞机,在空中飞行独自超过一小时,甚至驾机在空中翻...

极光推送
3分钟前
0
0
linux一次性解压多个.gz或者.tar.gz文件

解压多个压缩包 对于解压多个.gz文件的,用此命令: for gz in *.gz; do gunzip $gz; done 对于解压多个.tar.gz文件的,用下面命令: for tar in *.tar.gz; do tar xvf $tar; done...

小兔纸乖乖
14分钟前
0
0
bower 安装包的使用

一,bower是什么? bower是一种包管理器,它可用于搜索、安装和卸载如JavaScript、HTML、CSS之类的网络资源。 它依赖于node.js和npm,如果要使用它需要先安装node.js和npm,因为node.js包含n...

nsns
16分钟前
0
0
EXCEL简易的进度条

在进度栏非常简单的进度控制,以下知道程序是否已完成。 Dim x As IntegerDim MyTimer As Double'Change this loop as needed.For x = 1 To 50' Do stuffApplication.StatusBar = ...

tedzheng
21分钟前
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部