At first I tried the android ant build. I was finally (after some tweaking) able to build my project for Android. I tried running the apk on some chinese tablet. After I clicked the icon, it always said the application stop working (don't know the exact error message in English, it is a czech language version). It happened immediately without even showing anything from the application. Well that was kind of too general a problem to ask here. So I decided I need some way to debug the code. I gave up ant build and installed Android studio. That's where the real troubles start. So far, I'd say that it is a pretty crappy software. It installed everything all over again - SDK and NDK, even though those already had been installed. So I ended up with 2 copies of SDK and NDK. Great. After some more tweaking I was able to finally run Android studio using this tutorial:
I proceeded with the steps until I came to the phase where you launch the application in emulator. Basically I found I am out of luck with x86 emulator as it only supports Intel processors. Great, although I have the highest AMD CPU I can possibly have, I just cannot run the emulator as it seemes to use Intel seciffic HW virtualization and the AMD virtualization instruction set can be used just on Linux based systems. Right. That is not a JUCE related problem of course.
I could probably use the ARM based emulator if I was able to build the project at all. Now this situation is pretty non-deterministic. And I cannot even describe what is wrong. When I open the project, the run button is grayed out in Android Studio. Also there is no rebuild button, which I would expect might solve this. There is only the make button, which just says everything is up to date (which is obviously not true). When I try to resave/reopen the project from the Introjucer, It also behaves pretty nondeterministic. There's about 50% chance the Introjucer will hang showing the saving popup. In this case I need to kill the Introjucer process from the TaskManager. By the way, if this happens it takes up 4 GB of memory. I am quite sure this is not an intended behaviour. In the remaining 50 % of cases, it opens Andoid Studio, but I get some other error like this:
Or I get this window:
And right after that the previous error message.
I also tried running introjucer as administrator, so it is able to create the symlinks. It did, but it still wouldn't open the project in Android Studio. If I open the Android studio and try to open the project from there it takes like 10 minutes and then I still cannot do anything as the run button is grayed and trying to make the project says it is up to date.
I know that this is kind of too general a problem but if you have any suggestions I might try, I would be greatful.
//Edit: I suppose the jucer project is somehow broken. If I create new Hello World GUI application and export it to Android studio it "just" doesn't compile (see bellow), but it is opened with no problems. I also tried removing the Android exporter from the project above, deleting the Android folder manually and adding it again but that does not help.
When I create a new GUI application I get these errors:
Error:(40, 57) ../juce_core/native/juce_BasicNativeHeaders.h: No such file or directory Error:(43, 44) native/juce_BasicNativeHeaders.h: No such file or directory
... and so on for all the modules.
That relative path is strange because the JUCE library and the project are on a different drive. For example the first error is caused by this include:
included from app/src/main/jni/juce_gui_basics.cpp
Well, it is a symlink but my guess is that ../ relates to the symlink path and not to where it points.
It may have something to do with this problem (JUCE path containing space character):
Opening the project in Visual Studio is - of course - without any problems.
I'm on the latest tip.
//edit 2: After some reopening with Android Studio and Introjucer I managed to break the newly created project I was talking about as well. Now I get this window while trying to open the Android Studio project from Introjucer:
Now this error is definitelly related to this problem I mentioned in the first edit:
I think that you represent the spaces in the path in a wrong way. Please don't ignore this thread, this really needs to be fixed.