I've just checked out Juce's master branch from Git and I've been encountering a lot of issues so far when trying to build JuceDemo.
So after setting up the correct paths for the Android SDK and NDK (and having saved it) I import the project as an Android project in my Eclipse and...
Error in JuceDemo::onCreate! There's an import missing for android.media.AudioManager. Ok easy enough.
Then I try to run the build.xml and it seems there's a bug in the way the sdk.dir variable is resolved. See below:
C:\Users\Tbop\Documents\JUCE-master\extras\JuceDemo\Builds\Android>ant
Buildfile: C:\Users\Tbop\Documents\JUCE-master\extras\JuceDemo\Builds\Android\build.xml
BUILD FAILED
C:\Users\Tbop\Documents\JUCE-master\extras\JuceDemo\Builds\Android\build.xml:30: Cannot find C:\Users\Tbop\Documents\JUCE-master\extras\JuceDemo\Builds\Android\Program FilesAndroidadt-bundle-windo
ws-x86_64-20130729sdk\tools\ant\build.xml imported from C:\Users\Tbop\Documents\JUCE-master\extras\JuceDemo\Builds\Android\build.xml
Total time: 0 seconds
Odd path right? Well I've tried the hardcoded way and set the line build.xml:30 to the correct path. But then I've got another issue and this one remains unresolvable so far... Any idea?
C:\Users\Tbop\Documents\JUCE-master\extras\JuceDemo\Builds\Android>ant
Buildfile: C:\Users\Tbop\Documents\JUCE-master\extras\JuceDemo\Builds\Android\build.xml
[taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
[taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.
-set-mode-check:
-set-debug-files:
-check-env:
BUILD FAILED
C:\Program Files\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml:392: Problem: failed to create task or type checkenv
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
Uh? Actually you're right I can find it by browsing on the online repository but I don't get it then. Just downloaded the repository as a zip file about 4 hours ago.
Beforehand I had downloaded the latest release and the bug was definitely there (the reason why I downloaded the master branch instead).
Perhaps a problem of caching with eclipse. In fact, I had weird issues with it recently when opening similar projects twice in a row.
Sorry about that, what about the ant script error? About to redo the same on my mac to see if I can reproduce it but perhaps is something we should investigate as well later on.
I'll try to see what I can do with this: http://stackoverflow.com/questions/17074286/failed-to-create-task-or-type-checkenv-cause-the-name-is-undefined
No no I'm using the correct one. I think something went wrong at one point with eclipse and that the former version I had opened before updating to the latest build was still cached in eclipse only, somehow
The mac version seems to work properly at least, should be enough for what I want to do for now anywaz. Cheers!
not sure if this is the same phenomenon, but I got android juce stuff to build on Windows only by getting rid of the relative include paths in juce module includes. Seems to be due to a path length limitation in the NDK tools for Windows
for instance in JuceLibraryCode\modules\juce_core\juce_core.h the following workaround was needed:
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#if defined (JUCER_VS2012_78A501F)
#include "../../../../../SDKs/juce/modules/juce_core/juce_core.h"
#elif defined (JUCER_ANDROID_7F0E4A25)
#include "/dat/ws/altalogix/alxaudio/trunk/SDKs/juce/modules/juce_core/juce_core.h"
#elif defined (JUCER_XCODE_MAC_F6D2F4CF)
#include "../../../../../SDKs/juce/modules/juce_core/juce_core.h"
#elif defined (JUCER_XCODE_IPHONE_5BC26AE3)
#include "../../../../../SDKs/juce/modules/juce_core/juce_core.h"
#else
#error "This file is designed to be used in an Introjucer-generated project!"
#endif
no need to edit the .h files of course, you can do this simply by setting the LOCAL JUCE Folder to an absolute path in the introjucer for the Android build