navit-project.org

forum for navit navigation tool
It is currently 24 Nov 2017, 03:25
View unanswered posts | View active topics


All times are UTC


Forum rules


Feel free to ask anything here related to the installation and configuration of Navit.

Some notes before your first post:

Please provide as much informations as possible:



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Compilation for Android
PostPosted: 22 Mar 2017, 11:44 
Offline

Joined: 03 Sep 2015, 13:27
Posts: 5
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: java.io.IOException: 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 #
android-ndk-r8e

# 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 #
navit-R7363

# executed commands #
cd $BUILD_PATH
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


Attachments:
File comment: Messages and Errormessages of
step1=cmake
step2=make
step3=make apkg

MessagesAndErrors.zip [24.82 KiB]
Downloaded 25 times
 Profile  
 
 Post subject: Re: Compilation for Android
PostPosted: 23 Mar 2017, 14:24 
Offline

Joined: 26 Sep 2013, 10:59
Posts: 50
But Navit for Android is ready compiled on navit download?


 Profile  
 
 Post subject: Re: Compilation for Android
PostPosted: 26 Mar 2017, 11:23 
Offline

Joined: 03 Sep 2015, 13:27
Posts: 5
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.)


 Profile  
 
 Post subject: Re: Compilation for Android
PostPosted: 07 May 2017, 04:18 
Offline

Joined: 27 Sep 2013, 21:10
Posts: 50
linesoff, here's how we build the android build using circleci : https://github.com/navit-gps/navit/blob ... android.sh

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 : http://wiki.navit-project.org/index.php/Contacts#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 https://github.com/navit-gps/navit/releases/tag/R7473 is available in the prod channel of the PlayStore, and https://github.com/navit-gps/navit/releases/tag/R7478 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.


 Profile  
 
 Post subject: Re: Compilation for Android
PostPosted: 17 May 2017, 12:18 
Offline

Joined: 03 Sep 2015, 13:27
Posts: 5
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
"BUILD FAILED
/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: java.io.IOException: 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(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
....."
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.
Unfortunately


Attachments:
File comment: Protokoll messages of make apkg
mapkg_prot.txt [2.33 KiB]
Downloaded 30 times
File comment: Error-messages of make apkg
mapkg_err.txt [4.58 KiB]
Downloaded 24 times
File comment: build.xml in path SDK\tools\ant
build.xml [70.78 KiB]
Downloaded 21 times
 Profile  
 
 Post subject: Re: Compilation for Android
PostPosted: 11 Aug 2017, 09:34 
Offline

Joined: 03 Sep 2015, 13:27
Posts: 5
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 ?


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Silver Orange 2.0.6 for IPB Designed by Skins and Hosting
Converted for phpBB3, based on Royal Blue template by BigB © 2007 2008 AEON KINGS