Compilation for Android
Page 1 of 1

Author:  linesoff [ 22 Mar 2017, 11:44 ]
Post subject:  Compilation for Android

I tried to compile Navit for Android.
The sequence consists in three steps (cmake, make, make apkg).
The first two steps are performed reasonable, at least without abort.
But the last step fails clearly.
/media/sue/_SUE_DAT_/Prda/static/NvtGen/SDK/tools/ant/build.xml:694: Execute failed: Cannot run program "/media/sue/_SUE_DAT_/Prda/static/NvtGen/SDK/build-tools/23.0.1/aapt": error=2, No such file or directory
The "aap"t is existing in the mentioned path, probably another fie is missing ?
Maybe some message of the prior steps are important ?

The messages of the steps are in the attachments.
Is it possible to give a hint, what is wrong ?

# OS #
Lubuntu 16.04

# NDK #

# SDK #
Android SDK Tools 25.2.5
Android SDK Platform-tools 25.04
Android SDK Build-tools 23.0.1
Android 2.2 (API 8))
- SDK Platform API=8 Rev=3
-Samples for SDK API=8 Rev=1

# java -version #
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

# Navit source #

# executed commands #
cmake -DCMAKE_TOOLCHAIN_FILE=$SOURCE_PATH/Toolchain/arm-eabi.cmake -DCACHE_SIZE="(20*1024*1024)" -DAVOID_FLOAT=1 -DANDROID_PERMISSIONS="CAMERA" -DANDROID_API_VERSION=8 -DXSLT_PROCESSOR=/usr/bin/saxonb-xslt $SOURCE_PATH 2>step1_err.txt | tee step1_prot.txt
make 2>step2_err.txt | tee step2_prot.txt
make apkg 2>step3_err.txt | tee step3_prot.txt

File comment: Messages and Errormessages of
step3=make apkg [24.82 KiB]
Downloaded 428 times

Author:  Mapmapper [ 23 Mar 2017, 14:24 ]
Post subject:  Re: Compilation for Android

But Navit for Android is ready compiled on navit download?

Author:  linesoff [ 26 Mar 2017, 11:23 ]
Post subject:  Re: Compilation for Android

I found no newer compiled android navit than: 0.5.1+git9d1d5ab (from playstore)

Newer sets are apparently only available as source code.
That is the reason, why I like to compile android source code.
But did not succeed, see above.

(By the way, if compilation would work, I would like to discard by myself the annoying information about a speed camera with increasing distance . That is Ticket 1227. I do think that would be manageable.)

Author:  KaZeR [ 07 May 2017, 04:18 ]
Post subject:  Re: Compilation for Android

linesoff, here's how we build the android build using circleci : ...

This requires some environment variables to be set but otherwise it works (that's how we push updates to Google Play Store.
If you want some help cross-compiling for Android, feel free to join us for a live chat on IRC :
We are mostly active during western europe's evenings.

The build you mentionned ( 9d1d5ab ) is fairly recent. We do have a few updates available now (currently is available in the prod channel of the PlayStore, and is available in beta ).

Anyway these new builds won't currently solve your issue with the speed warning. I'll bump the trac ticket. In the meantime, chat with us on IRC and we can help you build your custom android package.

Author:  linesoff [ 17 May 2017, 12:18 ]
Post subject:  Re: Compilation for Android

Thank you for the reply.

I started again with the mentioned shell-scipt.
In order to get it running a made the following changes:
- I added the path ...SDK/tools to $PATH (not only platform-tools). Probably
this is done in the example outside the shell-script.
- I changed the API-Version from 25 (in the example)
to -DANDROID_API_VERSION=8 . Otherwise te generation fails in an early
step, saying API 25 is illegal.

I hope this modifications are correct.

With this modifications i tried to generate and again get the error-messages
/media/sue/_SUE_DAT_/ManSav/NvtGen/SDK/tools/ant/build.xml:649: The following error occurred while executing this line:
/media/sue/_SUE_DAT_/ManSav/NvtGen/SDK/tools/ant/build.xml:694: Execute failed: Cannot run program "/media/sue/_SUE_DAT_/ManSav/NvtGen/SDK/build-tools/23.0.1/aapt": error=2, No such file or directory
at java.lang.ProcessBuilder.start(
at java.lang.Runtime.exec(
The file aapt is existing on the listed path and is as "executable" marked in filemanager.

So the result is identical with the first approach.

File comment: Protokoll messages of make apkg
mapkg_prot.txt [2.33 KiB]
Downloaded 481 times
File comment: Error-messages of make apkg
mapkg_err.txt [4.58 KiB]
Downloaded 481 times
File comment: build.xml in path SDK\tools\ant
build.xml [70.78 KiB]
Downloaded 529 times

Author:  linesoff [ 11 Aug 2017, 09:34 ]
Post subject:  Re: Compilation for Android

Today I tried again.
I used the current navit source (R7651), same result.

I then updated the different SDK parts. The error messages change.
With the newest version the "make apkg" seem to have essential problem. The program ...SDK/tools/android has apparently changed its functionality.

So I wonder, if anyone use the described way
"Developing for Android With cmake"
and which set of SDK parts he uses.
Especially for Android SDK Build-tools I tried already some versions in the range 19 to 26.

Android SDK Tools ( 25.2.5 ) or different ?
Android SDK Platform-tools (25.04) or different ?
Android SDK Build-tools (23.0.1) or different ?
Android 2.2 (API 8))
- SDK Platform API=8 Rev=3 (seem to be a "must")

Is it thinkable, that nobody generates navit.apk ?

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group