Can’t build jxcore for android


I wanted to build the JXcore libraries for android, and i have encountered an error.

I have met all the Prerequisites: I’m running ubuntu 16.04, with gcc 5.4.0, python 2.7.12,GNU Make 4.1.

This are the steps i have followed:

  1. I have downloaded android ndk, and extracted it in ~/Downloads/android-ndk-r12b
  2. cloned the jxcore library in ~/Downloads/jxcore
  3. cd into jxcore
  4. ran build_scripts/ ../android-ndk-r12b/, this script finished successfully
  5. Then i needed to run build_scripts/ ../android-ndk-r12b/ --embed-leveldown

And i hit an error in the last step, this is the log:

Compiling Android ARM7

Traceback (most recent call last):
  File "./configure", line 1119, in <module>
  File "./configure", line 645, in configure_node
  File "./configure", line 569, in configure_arm
    elif is_arm_hard_float_abi():
  File "./configure", line 491, in is_arm_hard_float_abi
    if compiler_version() > (4, 6, 0):
  File "./configure", line 560, in compiler_version
    version  tuple(map(int, proc.communicate()[0].split('.')))
ValueError: invalid literal for int() with base 10: 'x\n'
compilation aborted for arm target

Does anyone know what causes this, or a fix for it ?


I ran into the same problem. I did a quick and dirty fix just to get going.

Open the “configure” file in your jxcore folder. Go to line number 560 as in the last entry in your log. Comment out line 560 with the # in front. Insert a changed version of that line underneath as shown below:

line 560: #version tuple(map(int, proc.communicate()[0].split('.')))

line 561: version tuple(map(int, "4.9.0".split('.')))

… basically what happens is that your version of CC goes something like “4.9.x” and as Python fails to convert the “x” to an integer the process stops. I just replaced the “x” with a “0”. However you might want to check your version just to be safe. Therefore place print proc.communicate()[0] right before line 560 before you make the other changes. Then your actual version number will be printed out in your log, when you run the program again.

I hope that may help you.

Answered By – Stefan

Leave a Comment