Juce Demo Android build problem

I use ndk r7 to build juce 2.0 demo on windows xp,get the errors below:

processors/juce_audio_processors.h:4,
from jni/…/…/…/Source/…/JuceLibraryCode/JuceHeader.h:20,
from jni/…/…/…/Source/jucedemo_headers.h:30,
from jni/…/…/…/Source/ApplicationStartup.cpp:26:
jni/…/…/…/Source/…/JuceLibraryCode/modules/juce_audio_processors/…/…/…/…
/…/modules/juce_audio_processors/…/juce_gui_basics/…/juce_graphics/colour/…/
images/…/contexts/juce_GraphicsContext.h:544: error: ISO C++ forbids declaratio
n of ‘RectanglePlacement’ with no type
jni/…/…/…/Source/…/JuceLibraryCode/modules/juce_audio_processors/…/…/…/…
/…/modules/juce_audio_processors/…/juce_gui_basics/…/juce_graphics/colour/…/
images/…/contexts/juce_GraphicsContext.h:544: error: expected ‘,’ or ‘…’ befo
re ‘&’ token
make: *** [obj/local/armeabi/objs/juce_jni///__/Source/ApplicationStartup.o]
Error 1

is there anyone encounter the same problem?
Thanks.

Works ok here with the NDK r7c… Maybe try that?

I tried NDK r7c, got the same error.

Are you sure you’ve not accidentally messed up the content of that file or something? There’s absolutely nothing wrong with the line of code that your error mentions!

I don’t know why have this problem on windows, but now I try to compile it on ubuntu using ndk r8,
later I make a apk by eclipse.
It 's very cool on my me525+, thinks!

Trying to get the demo to build for Android (on Windows 7 x64), but having the same problems, ndk r10c, SDK from 20140702. NDK and SDK is symbolic linked so they're under ~/SDKs.

Juce is checked out, running ant I get:


-pre-build:
     [exec] [armeabi] Gdbserver      : [arm-linux-androideabi-4.8] libs/armeabi/gdbserver
     [exec] [armeabi] Gdbsetup       : libs/armeabi/gdb.setup
     [exec] [armeabi-v7a] Gdbserver      : [arm-linux-androideabi-4.8] libs/armeabi-v7a/gdbserver
     [exec] [armeabi-v7a] Gdbsetup       : libs/armeabi-v7a/gdb.setup
     [exec] [armeabi] Compile++ thumb: juce_jni <= Main.cpp
     [exec] [armeabi] Compile++ thumb: juce_jni <= MainWindow.cpp
     [exec] In file included from jni/../../../Source/../JuceLibraryCode/modules/juce_audio_processors/../../../../../modules/juce_audio_processors/../juce_gui_
basics/juce_gui_basics.h:28:0,
     [exec]                  from jni/../../../Source/../JuceLibraryCode/modules/juce_audio_processors/../../../../../modules/juce_audio_processors/juce_audio_p
rocessors.h:28,
     [exec]                  from jni/../../../Source/../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:4,
     [exec]                  from jni/../../../Source/../JuceLibraryCode/JuceHeader.h:20,
     [exec]                  from jni/../../../Source/JuceDemoHeader.h:29,
     [exec]                  from jni/../../../Source/Main.cpp:26:
     [exec] jni/../../../Source/../JuceLibraryCode/modules/juce_audio_processors/../../../../../modules/juce_audio_processors/../juce_gui_basics/../juce_graphic
s/juce_graphics.h:105:60: fatal error: contexts/juce_LowLevelGraphicsSoftwareRenderer.h: No such file or directory
     [exec]  #include "contexts/juce_LowLevelGraphicsSoftwareRenderer.h"
     [exec]                                                             ^
     [exec] compilation terminated.
     [exec] make.exe: *** [obj/local/armeabi/objs-debug/juce_jni/__/__/__/Source/Main.o] Error 1
     [exec] make.exe: *** Waiting for unfinished jobs....
     [exec] In file included from jni/../../../Source/../JuceLibraryCode/modules/juce_audio_processors/../../../../../modules/juce_audio_processors/../juce_gui_
basics/juce_gui_basics.h:28:0,
     [exec]                  from jni/../../../Source/../JuceLibraryCode/modules/juce_audio_processors/../../../../../modules/juce_audio_processors/juce_audio_p
rocessors.h:28,
     [exec]                  from jni/../../../Source/../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:4,
     [exec]                  from jni/../../../Source/../JuceLibraryCode/JuceHeader.h:20,
     [exec]                  from jni/../../../Source/JuceDemoHeader.h:29,
     [exec]                  from jni/../../../Source/MainWindow.cpp:26:
     [exec] jni/../../../Source/../JuceLibraryCode/modules/juce_audio_processors/../../../../../modules/juce_audio_processors/../juce_gui_basics/../juce_graphic
s/juce_graphics.h:105:60: fatal error: contexts/juce_LowLevelGraphicsSoftwareRenderer.h: No such file or directory
     [exec]  #include "contexts/juce_LowLevelGraphicsSoftwareRenderer.h"
     [exec]                                                             ^
     [exec] compilation terminated.
     [exec] make.exe: *** [obj/local/armeabi/objs-debug/juce_jni/__/__/__/Source/MainWindow.o] Error 1

Help!!

It kind of looks like you've got files missing or in the wrong place?

Ok, but I've just checked out JUCE in its entirety, went into examples\JuceDemo\Builds\Android and ran ant. Shouldn't the Android build there be setup for the JUCE source tree as is ?

 

Are you on Windows? TBH I've only ever attempted android builds on OSX/linux, I don't trust the win32 paths to work correctly without some tweaking, since the whole android toolchain is very unix-oriented.

Yup, Win7x64. Once I've setup ndk/sdk path (and changed ndk-build to ndk-build.cmd in the build.xml file), it all seems to start compiling, however it seems that some include paths are off.

 

By adding this to extra compiler flags:

-I "../../../../modules/juce_graphics" -I "../../../../modules/juce_data_structures"

it all seems to build now.
 

Also, in project.properties I've set the target to an SDK target I actually had installed :)