Android ANT build bug/problem?


#1

Cheers, I have encountered and traced an interesting problem (I used much worse expressions until I found out what's this about...).

I use this to be able to ant-build:

http://www.juce.com/forum/topic/compile-juce-android-project-windows

 

When trying to compile simple project that does some network communication for Android I got this output:

 

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
     [echo] proguard.config is ${proguard.config}

-pre-build:
     [exec] Android NDK: WARNING: Unsupported source file extensions in jni/Android.mk for module juce_jni
     [exec] Android NDK:   C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\
C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\
     [exec] Android NDK: WARNING: Unsupported source file extensions in jni/Android.mk for module juce_jni
     [exec] Android NDK:   C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\
C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\
     [exec] make.exe: *** No rule to make target `jni/libs/JUCE-master/modules/juce_audio_basics/juce_audio_basics.cpp', needed by `obj/local/armeabi/objs/juce_
jni/libs/JUCE-master/modules/juce_audio_basics/juce_audio_basics.o'.  Stop.
     [exec] make.exe: *** Waiting for unfinished jobs....
     [exec] Android NDK: WARNING: Unsupported source file extensions in jni/Android.mk for module juce_jni
     [exec] Android NDK:   C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\
C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\ C:/Users/Aros/C++\
     [exec] [armeabi] Compile++ thumb: juce_jni <= MainComponent.cpp
     [exec] [armeabi] Compile++ thumb: juce_jni <= Main.cpp

BUILD FAILED
D:\Dokumenty\Projects\Vyuka\JUCE_TCPIP_demo\Builds\Android\build.xml:23: exec returned: 2

 

Well, It still repeats the same thing:
C:/Users/Aros/C++\

 

Obvisously there is no C++ named file on my filesystem. The thing is that it is trying to access the files listed in jni/Android.mk but does not understand the escape sequence. The folder is named C++ libs (with space) in which I have JUCE (among others) library.

The lines listed in LOCAL_SRC_FILES in Android.mk looks like this:

C:/Users/Aros/C++\ libs/JUCE-master/modules/juce_audio_basics/juce_audio_basics.cpp\

So the problem is it does not understand the escape sequence for the space character. What I had to do to be able to build is to move the project in the JUCE library so that it does not use the absolute path and let the space character be eaten up by the relative path... It worked but that is not a good solution (of course). Doesn't Android.mk have some special syntax to express spaces? I mean what the hell - it is a valid filename.

 

I could rename the folder so that it doesn't contain the space character but that would basically mean fixing dozens of projects and their references which I would like to avoid...

 

I wasn't sure whether to post this in Android section or General discussion, but it is a compilation related so I put it here.

 

Windows 7 64 Pro

IDE: VS2015

Build: ant


#2

It probably affect even the Android Studio build. See:

http://www.juce.com/forum/topic/android-studio-errors-and-errors

 

Please could anyone at ROLI at least state their opinion. The problem is with the space characters in the path. The question is whether this can be actually solved. Escaping the space obviously doesn't solve the problem.


#3

As mentioned in the other thread (http://www.juce.com/forum/topic/android-studio-errors-and-errors), on Android Studio this should now work on Windows (I fixed the space characters issue). Could you please check and verify that? Many thanks!