[RESOLVED] Problem with AnroidImageExample on Windows

Hii

I’ve set up openframeworks for android on my windows 8 and have ran some of the examples like androidPolygonExample successfully on my tablet.

However when I try to run the example androidImageExample, I run into some errors and the image is not shown.
This is the part of the output from LogCat with the error :

07-29 17:52:46.969: D/libEGL(16779): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so
07-29 17:52:46.989: D/libEGL(16779): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so
07-29 17:52:47.059: D/OpenGLRenderer(16779): Enabling debug mode 0
07-29 17:52:47.099: I/OF(16779): onSurfaceCreated

07-29 17:52:47.109: E/IMGSRV(16779): :0: glGetString: Unknown name

07-29 17:52:47.109: I/ofAppAndroidWindow(16779): setup

> 07-29 17:52:47.119: E/ofImage(16779): loadImage(): couldn't load image from "images/bikers.jpg"

07-29 17:52:47.119: I/ofAppAndroidWindow(16779): resize 1280x719
07-29 17:52:47.129: W/ofGLRenderer(16779): drawing an unallocated texture
07-29 17:52:47.149: W/ofGLRenderer(16779): drawing an unallocated texture
07-29 17:52:47.159: W/ofGLRenderer(16779): drawing an unallocated texture
07-29 17:52:47.159: W/ofGLRenderer(16779): drawing an unallocated texture
07-29 17:52:47.179: W/ofGLRenderer(16779): drawing an unallocated texture

Also I should mention that the first time I tried this example, eclipse deleted the data folder inside bin, and there was no zip file in the res/raw folder, but I downloaded openframeworks again and re-imported the project and after compiling, it made the zip file inside the raw directory.

My OF version is 0.8.3_android.

Thanks in advance

Hi, do u have the “images/bikers.jpg” file inside the created zip?

And do u have the /sdcard/Android/data/cc.openframeworks.androidImageExample/images/bikers.jpg file on the device?

Hii
Yes I have the images/bikers.jpg inside the zip.
On the tablet, the bikers.jpg is inside the following location:

Android\data\cc.openframeworks.androidImageExample\files\bin\data\images

Edit: I finally resolved the problem by getting help from this similar thread
As Arturo suggested there, I added ofLogNotice() << ofToDataPath("") to see the path and finally resolved it by adding ‘bin/data’ to the path:

image.loadImage("bin/data/images/bikers.jpg");