Getting started with JUCE for Android

I need to start creating an Android application that uses JUCE libraries. I am reading a website and trying to understand what is going on.

I tried installing JUCE on Ubuntu 11.04, and when I built the IntroJucer application, the menus do not work correctly (they open when I click, but then disappear). Can a JUCE application for Android be built on Mac OS X or even Windows?

If you use JUCE to create Android apps, please give me any advice you can.

+4
source share
2 answers

Yes, the Juce app can be written for Android using OS X (XCode 4) or Windows (Microsoft Visual Studio 2008 and later). You also have the option of using the Eclipse IDE on any platform.

At the time you sent the message, Juce underwent a major review, and IntroJucer may not have been as stable as needed, especially on systems other than OS X or Windows. You should look into it again. IntroJucer is not required to create a Juce application (although this may make the task easier).

I suggest you first create the Juce Demo app for your platform. If Ubuntu gives you problems, first try OS X or Windows. Once you run the Juce demo, you can go to IntroJucer. If this works, try compiling Juce Demo for Android. You can answer your question on the Android Juce forum:

http://rawmaterialsoftware.com/viewforum.php?f=13

+4
source

Here is what I found out now that I worked a bit with this material.

All of this is based on the latest โ€œstableโ€ release of JUCE, which is about ten months old when I write this. It is possible that everything has changed (for the better!) In the more prominent releases of JUCE, and when I get a chance, I will try the new JUCE.

  • The best platform is Mac OS X. When I tried Linux, I had problems with Eclipse that didn't work; I still prefer Linux, so I'm going to come back and try again, but on Windows and Mac I had no problems with Eclipse.

  • Start by installing the Android SDK and starting the update to get all the updates. Also install Android NDK and Eclipse. In Eclipse, install the ADT plugin.

  • JUCE installs the Ant build file, which will automatically generate all the C ++ code for you. You do not need to bother with this. I had a problem when the "setup" function was set and Ant did not know how to resolve it; the solution was to remove the โ€œsettingsโ€ task and not touch anything. When I tried to figure out how to solve this problem, I found StackOverflow suggestions here to run this command: android update project --path . DO NOT DO IT for JUCE. This overwrites your build.xml file, and the special JUCE material for building C ++ code disappears; then you create and get a tiny .APK file (about 10 KB) containing only Java installation code and not compiled C ++, and it doesnโ€™t work. Therefore, to be clear, the solution to the build problem of installation is to remove this build task and not touch anything, and not completely replace your build.xml file.

  • The JUCE build process relies on a Bash script shell to do some work. On Mac OS X, this works great; on Windows, the assembly failed with CreateProcess() because CreateProcess() does not understand the Bash shell scripts. It should be possible to edit this and make it work, but out of the box it works great on Mac OS X.

  • To test your code on an Android device, you must sign your code. Eclipse makes it easy to collect either a signed or unsigned.APK file, but an unsigned file is almost useless. The only thing you can do with unsigned.APK is run it in the emulator.

Once I had everything right, I had no problems creating the JUCE application for Android.

+5
source

Source: https://habr.com/ru/post/1395510/


All Articles