To cut a long story short, my hatred for All things Android has brought me full circle. Since my iOS experiments yesterday were very reasonable, I started looking at Android again to see if Juce might save me periodic Android utility development grief.
But I am a loss as to how to build/run today’s commit without crashing on the Emulator. I tried to minimize variables, I setup a new Android environment on a Mac, and put the NDK and SDK in the same paths (/SDKs) as Jules. I can open Eclipse, import a NDK sample, build, and run it.
But my two JUCE attempts end in heart ache.
Case 1: Used latest Introjucer to make a new project, added the Android Target, said to create a simple window. I disabled all the audio modules, cryptography, camera, and extended gui.
I built and ran in in XCode to make sure that I hadn’t missed any dependancies. All OK.
Next, I built it using “ant debug” from the Build/Android folder. The lib compiled, and the Java files were copied from modules to src/com, but, as I expected, no apk file was generated.
So I reverted to pre-build, opened Eclipse, selected New Project, from existing source, made the name JuProject, and pointed to the same folder.
Running this project as is results in a class not found error, which is what I would expect. So, again, I reverted, created a project from existing, checked that the target was Google API 7 (which I did install, as well as 4.03), right clicked on the project, and added Native API support, checking the NDK path, and setting the lib to “libjuce_jni.so”.
This compiles fully in Eclipse, packages the library, and runs, only to explode on the emulator (either running 4.03 or 2.1). The exception is class not found, thrown from a call to method.invokeNative, which seemed to suggest to me that the library was being invoked. But I simply could not get Eclipse to do source breakpoints or even stack source display in the lib.
So, as I’ve done with JUCE before, I ran to Case 2, JUCEDemo. I basically repeated the steps above, basically deleting the Android folder and using git reset --hard to revert each time.
Open New Project in Eclipse, use existing source, right click and add native support, using libjuce_jni.so for the library name get’s the farthest, that is, it builds without error and appears to package up. But, again, it explodes in execution, both in 4.03 and 2.1, but after sending some system information to the log, which seems to strongly suggest that JuceDemo at least started.
I hate hitting up others for build stuff, but I did notice that with JUCEDemo, I had to manually create a “com” folder under “src” for the JuceAppActivity class to get copied from Modules/Core. It seems that Introjucer created that empty folder structure automatically with my new project. That made me wonder what, precisely, the state of Android was on tip of the Modules branch.
I guess what I’m looking for is the commit on this branch that someone can confirm JUCEDemo builds and runs, and what SDK/NDK it links with, and what platform runs on the Emulator. Since I have to manually tweak the directory structure to get JUCE Demo to work now, I either have operator error, or am in an indeterminate state.
I’d also bee curious if anyone has gotten source Native debugging working under Eclipse with Mac. I have gotten it to work on Windows for another project, but I had no luck here.
Thanks in advance for any help!
PS. Eclipse is SDK 3.7.1 and SDK and NDK are latest as of today.