Juce Demo App crashes on Android


#1

Hi there,

 

Firstly can I say what a great job you have done with this library. I have only come across this last week and so far have been impressed. This week I built the demo app on Windows and had a play.

As a test I thought I would try and build the demo app for Android. I have installed Ubuntu for this, downloaded all the pre-requisites and imported the project into Eclipse. 

 

Everythign builds fine. I get no errors. It even produces a .APK file.

My problem is when I come to run the app on the phone it starts to load then crashes!

 

I dont know what I could have done wrong. 

I decided to run the app in the android virtual device (AVD) to see if I could find out where the problem is. I have taken some screenshots of the errors in the hope someone might be able to let me know what my problem is:

 

http://postimg.org/image/yft1q8dx7/

 

error

 

The error says: 

 

Couldnt load juce_jni from loader dalvik.system.PathClassLoader[DexPathList[[Zip file "/data/app/com.juce.jucedemo-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.juce.jucedemo-1, /system/lib]]]:findlibrary returned null.

                at java.lang.Runtime.loadLibrary(Runtime.java:358)

 

 

 

Hope someone can help! 

 

Thanks in advance.

 

Ade

 

 

 

 


#2

It works fine here (only oddity I've noticed on my devices, so far, is that Portmeirion OpenGl texture is BRG instead of RGB).

Hmm, that JNI error looks suspicious

Erm, did you build with the NDK?

 

 

 


#3

"Erm, did you build with the NDK?"

Ooo, do I have to do something different than I am. Sorry this is my 1st time trying to build with the NDK

I have installed both the SDK and the NDK. Setup the paths etc.

 

These are the steps I took:

 

1. "imported"  he Android DEMO project in Eclipse by going to file->Import and selected "import Android Code into Workspace"

2. With the project loaded I right-click on the project, went to Android Tools and select "Export Signed Application Package.."

 

Sorry, coming from Visual Studio this is all foreign to me..  

 

Thanks in advance for any help you can give.

 

 


#4

Note, I found I had quite a lot of playing round with different ways of adding projects before I found one that worked reliably... I use File->New->Other Project -> Android Project from existing code to create Eclipse projects from the Android build folder created by Introjucer

 

After you have added the project, Right click on the project, and under Android Tools you may see "Add native support..."

Then I Build the prject, and finally run it (with phone connected via USB). I only build APKs when I know the thing's working. But that's just me

 


#5

Thank you for your help.

 

I will try this just shortly smiley


#6

....you cracked it!

 

IT WORKS!!!! - Awesome..

 

Thank you. I needed to "Add native support..." from the Android Tools menu.

Its taken me a day (starting by installing ubuntu) but with your help I got there.

 

The apk went from 30Kb to 3Meg... 

 

Thanks

 


#7

Are you guys using ant before loading it in Eclipse? I was calling ant debug in the Android builds folder first, but I don't know if that's extraneous.