Android:i compile the SampleBrowser,but it run like a mess

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
linziwen
Gnoblar
Posts: 6
Joined: Wed May 12, 2010 11:04 am

Android:i compile the SampleBrowser,but it run like a mess

Post by linziwen »

i compille ogre with android dependence:
ogre version is: "sinbad-ogre-2b209edaa37a.zip"
dependence verion is: "AndroidDependencies.zip".
ndk version is: "android-ndk-r8-linux-x86.tar.bz2"
my os is: ubuntu 12.04 64bit
my pnone is htc sensation 4g with android 4.0.4

the process of compiling and installing the samplebrowser was success, but the sample runs like missing something. I can see the rectangle on the scene with yellow color.
so i try to replace my SampleBrowser with google play SampleBrowser and it runs with proper color. But when finished loading the resources it crash.

please help.thank you very much.
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99

Re: Android:i compile the SampleBrowser,but it run like a me

Post by Wolfmanfx »

Freeimagr is missing - which os do you use linux?
linziwen
Gnoblar
Posts: 6
Joined: Wed May 12, 2010 11:04 am

Re: Android:i compile the SampleBrowser,but it run like a me

Post by linziwen »

Wolfmanfx wrote:Freeimagr is missing - which os do you use linux?
i use one of the linux distro ubuntu 12.04 64bit,but it seem to be included in your android dependence lib.
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99

Re: Android:i compile the SampleBrowser,but it run like a me

Post by Wolfmanfx »

I have to retest it on ubuntu - maybe its a case problem so it can not find freeimage - there is FindFreeimage.cmake inside the CMake folder.
linziwen
Gnoblar
Posts: 6
Joined: Wed May 12, 2010 11:04 am

Re: Android:i compile the SampleBrowser,but it run like a me

Post by linziwen »

actually i found the solution with many times' try:
1 before compiling ogre, locate the dir of the android dependences "AndroidDependencies/lib/armeabi" and change the name of the "libFreeImage.a" to "libfreeimage.a".
2 compile ogre according to the wiki
3 change the "libfreeimage.a" back to "libFreeImage.a" or open the android make file "<build>/SampleBrowserNDK/jni/Android.mk" change "-lFreeImage" to "-lfreeimage"
4 change dir to "<build>/SampleBrowserNDK"
5 ant debug
6 connect my mobile by usb cable
7 adb install ./bin/[apk's name]
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99

Re: Android:i compile the SampleBrowser,but it run like a me

Post by Wolfmanfx »

No this is correct i fixed the case stuff (to be sure i just checked it again on sf and ogre code) - you had better cleared your build dir and use the latest deps.