What's wrong? ant debug Demo win7-64bit


#1

local.propertis:
sdk.dir=C:\Users\Ceti\SDKs\android-sdk
ndk.dir=C:\Users\Ceti\SDKs\android-ndk
key.store=C:\Users\Ceti\.android\debug.keystore
key.alias=androiddebugkey
key.store.password=android
key.alias.password=android

E:\OtherGame\juce\extras\JuceDemo\Builds\Android>ant debug
Buildfile: E:\OtherGame\juce\extras\JuceDemo\Builds\Android\build.xml
Trying to override old definition of task setup

-set-mode-check:

-set-debug-files:

-set-debug-mode:

-debug-obfuscation-check:

-setup:
[echo] Creating output directories if needed…
[echo] Gathering info for Juce Demo…
[setup] Android SDK Tools Revision 18
[setup] Project Target: Android 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup] API<=15: Adding annotations.jar to the classpath.
[setup]
[setup] ------------------

-build-setup:

-pre-build:

BUILD FAILED
E:\OtherGame\juce\extras\JuceDemo\Builds\Android\build.xml:30: Execute failed: j
ava.io.IOException: Cannot run program “C:\Users\Ceti\SDKs\android-ndk\ndk-build
”: CreateProcess error=193, %1 is not a valid Win32 application
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:862)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application

    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 24 more

Total time: 4 seconds


#2

You need to replace ndk-build with ndk-build.cmd in build.xml


#3

Thank you ,but has other Problem
E:\OtherGame\juce\extras\JuceDemo\Builds\Android>ant debug
Buildfile: E:\OtherGame\juce\extras\JuceDemo\Builds\Android\build.xml

-set-mode-check:

-set-debug-files:

-set-debug-mode:

-debug-obfuscation-check:

-setup:
[echo] Creating output directories if needed…
[echo] Gathering info for Juce Demo…
[setup] Android SDK Tools Revision 18
[setup] Project Target: Android 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup] API<=15: Adding annotations.jar to the classpath.
[setup]
[setup] ------------------

-build-setup:

-pre-build:
[exec] "Compile++ thumb : juce_jni <= ApplicationStartup.cpp
[exec] "Compile++ thumb : juce_jni <= MainDemoWindow.cpp
[exec] In file included from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_
basics/…/juce_graphics/colour/…/images/juce_Image.h:30:0,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_
basics/…/juce_graphics/colour/juce_FillType.h:30,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_
basics/…/juce_graphics/juce_graphics.h:80,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_
basics/juce_gui_basics.h:29,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/juce_audio_p
rocessors.h:29,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/juce_audio_processors.h:4,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/JuceHea
der.h:20,
[exec] from jni/…/…/…/Source/jucedemo_headers.h:30,
[exec] from jni/…/…/…/Source/ApplicationStartup.cpp:26:

 [exec] jni/../../../Source/../JuceLibraryCode/modules/juce_audio_processors

/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_basics/…/juce_graphic
s/colour/…/images/…/contexts/juce_GraphicsContext.h:31:45: fatal error: …/geo
metry/juce_PathStrokeType.h: No such file or directory
[exec] compilation terminated.
[exec] make: *** [obj/local/armeabi/objs-debug/juce_jni////Source/App
licationStartup.o] Error 1
[exec] make: *** Waiting for unfinished jobs…
[exec] In file included from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_
basics/…/juce_graphics/colour/…/images/juce_Image.h:30:0,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_
basics/…/juce_graphics/colour/juce_FillType.h:30,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_
basics/…/juce_graphics/juce_graphics.h:80,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_
basics/juce_gui_basics.h:29,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/…/…/…/…/…/modules/juce_audio_processors/juce_audio_p
rocessors.h:29,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/modules
/juce_audio_processors/juce_audio_processors.h:4,
[exec] from jni/…/…/…/Source/…/JuceLibraryCode/JuceHea
der.h:20,
[exec] from jni/…/…/…/Source/jucedemo_headers.h:30,
[exec] from jni/…/…/…/Source/MainDemoWindow.cpp:26:
[exec] jni/…/…/…/Source/…/JuceLibraryCode/modules/juce_audio_processors
/…/…/…/…/…/modules/juce_audio_processors/…/juce_gui_basics/…/juce_graphic
s/colour/…/images/…/contexts/juce_GraphicsContext.h:31:45: fatal error: …/geo
metry/juce_PathStrokeType.h: No such file or directory
[exec] compilation terminated.
[exec] make: *** [obj/local/armeabi/objs-debug/juce_jni/
///Source/Mai
nDemoWindow.o] Error 1

BUILD FAILED


#4

Yes I have had this strange issue too, not sure what was wrong, probably cygwin’s git is making some links that are not accepted by the android toolchain. I think it was enough to re-generate the JuceDemo project with the introjucer, or maybe even just duplicating the juce sources somewhere else was enough to solve this issue: cp -r juce/extras/JuceDemo JuceDemo-test