Install and build GroundSdk

Hello, following instruction to Install and build GroundSdk from Install and build GroundSdk - 7.3, I have some steps wich doesn’t work : here it is: (thank you in advance for guidelines to resolve these pitfalls).

1/ on web page: Install and build GroundSdk - 7.3

`> => Environment setup / Linux /

=>=> ~$ sudo apt install git python python3 make pkg-config
=>=>=> doesn’t work:
Lecture des listes de paquets… Fait
Construction de l’arbre des dépendances
Lecture des informations d’état… Fait
make est déjà la version la plus récente (4.2.1-1.2).
make passé en « installé manuellement ».
git est déjà la version la plus récente (1:2.19.1-1ubuntu1.1).
python3 est déjà la version la plus récente (3.6.7-1~18.10).
python3 passé en « installé manuellement ».
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
libncursesw5 libtinfo5
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
Les paquets supplémentaires suivants seront installés :
libpython-stdlib libpython2-stdlib python-minimal python2 python2-minimal
python2.7 python2.7-minimal
Paquets suggérés :
python-doc python-tk python2-doc python2.7-doc binfmt-support
Les NOUVEAUX paquets suivants seront installés :
libpython-stdlib libpython2-stdlib pkg-config python python-minimal python2
python2-minimal python2.7 python2.7-minimal
0 mis à jour, 9 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 1 635 ko/1 680 ko dans les archives.
Après cette opération, 4 876 ko d’espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] O
Err :1 fr.archive.ubuntu.com / ubuntu.lafibre.info cosmic-updates/main amd64 python2.7-minimal amd64 2.7.16-2~18.10
404 Not Found [IP : 2001:860:f70a::2 80]
Err :2 fr.archive.ubuntu.com / ubuntu.lafibre.info cosmic/main amd64 python2-minimal amd64 2.7.15-3
404 Not Found [IP : 2001:860:f70a::2 80]
Err :3 fr.archive.ubuntu.com / ubuntu.lafibre.info cosmic/main amd64 python-minimal amd64 2.7.15-3
404 Not Found [IP : 2001:860:f70a::2 80]
Err :4 fr.archive.ubuntu.com / ubuntu.lafibre.info cosmic-updates/main amd64 python2.7 amd64 2.7.16-2~18.10
404 Not Found [IP : 2001:860:f70a::2 80]
Err :5 fr.archive.ubuntu.com / ubuntu.lafibre.info cosmic/main amd64 libpython2-stdlib amd64 2.7.15-3
404 Not Found [IP : 2001:860:f70a::2 80]
Err :6 fr.archive.ubuntu.com / ubuntu.lafibre.info cosmic/main amd64 libpython-stdlib amd64 2.7.15-3
404 Not Found [IP : 2001:860:f70a::2 80]
Err :7 fr.archive.ubuntu.com / ubuntu.lafibre.info cosmic/main amd64 python2 amd64 2.7.15-3
404 Not Found [IP : 2001:860:f70a::2 80]
Err :8 fr.archive.ubuntu.com / ubuntu.lafibre.info cosmic/main amd64 python amd64 2.7.15-3
404 Not Found [IP : 2001:860:f70a::2 80]
E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7-minimal_2.7.16-2~18.10_amd64.deb 404 Not Found [IP : 2001:860:f70a::2 80]
E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/p/python-defaults/python2-minimal_2.7.15-3_amd64.deb 404 Not Found [IP : 2001:860:f70a::2 80]
E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/p/python-defaults/python-minimal_2.7.15-3_amd64.deb 404 Not Found [IP : 2001:860:f70a::2 80]
E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7_2.7.16-2~18.10_amd64.deb 404 Not Found [IP : 2001:860:f70a::2 80]
E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/p/python-defaults/libpython2-stdlib_2.7.15-3_amd64.deb 404 Not Found [IP : 2001:860:f70a::2 80]
E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/p/python-defaults/libpython-stdlib_2.7.15-3_amd64.deb 404 Not Found [IP : 2001:860:f70a::2 80]
E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/p/python-defaults/python2_2.7.15-3_amd64.deb 404 Not Found [IP : 2001:860:f70a::2 80]
E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/p/python-defaults/python_2.7.15-3_amd64.deb 404 Not Found [IP : 2001:860:f70a::2 80]
E: Impossible de récupérer certaines archives, peut-être devrez-vous lancer apt-get update ou essayer avec --fix-missing ?`

2/ On web page: Install Android Studio  |  Android Developers
=> Linux / To install Android Studio on Linux / Required libraries for 64-bit machines / =>=> Androïd Studio is OK but =>=>=> Command "~$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 " =>=>=>=> doesn't work: Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires : libncursesw5 libtinfo5 Veuillez utiliser « sudo apt autoremove » pour les supprimer. Les paquets supplémentaires suivants seront installés : gcc-8-base:i386 libc6-i386 libgcc1:i386 libgpm2:i386 libidn2-0:i386 libtinfo5:i386 libunistring2:i386 Paquets suggérés : glibc-doc:i386 locales:i386 gpm:i386 Les NOUVEAUX paquets suivants seront installés : gcc-8-base:i386 lib32z1 libbz2-1.0:i386 libc6:i386 libc6-i386 libgcc1:i386 libgpm2:i386 libidn2-0:i386 libncurses5:i386 libstdc++6:i386 libtinfo5:i386 libunistring2:i386 0 mis à jour, 12 nouvellement installés, 0 à enlever et 0 non mis à jour. Il est nécessaire de prendre 6 289 ko/6 412 ko dans les archives. Après cette opération, 31,0 Mo d'espace disque supplémentaires seront utilisés. Souhaitez-vous continuer ? [O/n] O Ign :1 http://fr.archive.ubuntu.com/ubuntu cosmic-updates/main i386 gcc-8-base i386 8.3.0-6ubuntu1~18.10.1 Ign :2 http://fr.archive.ubuntu.com/ubuntu cosmic-updates/main i386 libgcc1 i386 1:8.3.0-6ubuntu1~18.10.1 Err :3 http://fr.archive.ubuntu.com/ubuntu cosmic/main i386 libc6 i386 2.28-0ubuntu1 404 Not Found [IP : 2001:860:f70a::2 80] Ign :4 http://fr.archive.ubuntu.com/ubuntu cosmic-updates/main i386 libbz2-1.0 i386 1.0.6-9ubuntu0.18.10.1 Err :5 http://fr.archive.ubuntu.com/ubuntu cosmic-updates/main i386 libunistring2 i386 0.9.10-1ubuntu1.18.10.1 404 Not Found [IP : 2001:860:f70a::2 80] Ign :6 http://fr.archive.ubuntu.com/ubuntu cosmic-updates/main i386 libstdc++6 i386 8.3.0-6ubuntu1~18.10.1 Err :7 http://fr.archive.ubuntu.com/ubuntu cosmic/main amd64 libc6-i386 amd64 2.28-0ubuntu1 404 Not Found [IP : 2001:860:f70a::2 80] Err :8 http://fr.archive.ubuntu.com/ubuntu cosmic/main i386 libtinfo5 i386 6.1+20180210-4ubuntu1 404 Not Found [IP : 2001:860:f70a::2 80] Err :9 http://fr.archive.ubuntu.com/ubuntu cosmic/universe i386 libncurses5 i386 6.1+20180210-4ubuntu1 404 Not Found [IP : 2001:860:f70a::2 80] Err :1 http://security.ubuntu.com/ubuntu cosmic-updates/main i386 gcc-8-base i386 8.3.0-6ubuntu1~18.10.1 404 Not Found [IP : 2001:860:f70a::2 80] Err :2 http://security.ubuntu.com/ubuntu cosmic-updates/main i386 libgcc1 i386 1:8.3.0-6ubuntu1~18.10.1 404 Not Found [IP : 2001:860:f70a::2 80] Err :4 http://security.ubuntu.com/ubuntu cosmic-updates/main i386 libbz2-1.0 i386 1.0.6-9ubuntu0.18.10.1 404 Not Found [IP : 2001:860:f70a::2 80] Err :6 http://security.ubuntu.com/ubuntu cosmic-updates/main i386 libstdc++6 i386 8.3.0-6ubuntu1~18.10.1 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer http://security.ubuntu.com/ubuntu/pool/main/g/gcc-8/gcc-8-base_8.3.0-6ubuntu1~18.10.1_i386.deb 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer http://security.ubuntu.com/ubuntu/pool/main/g/gcc-8/libgcc1_8.3.0-6ubuntu1~18.10.1_i386.deb 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.28-0ubuntu1_i386.deb 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer http://security.ubuntu.com/ubuntu/pool/main/b/bzip2/libbz2-1.0_1.0.6-9ubuntu0.18.10.1_i386.deb 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/libu/libunistring/libunistring2_0.9.10-1ubuntu1.18.10.1_i386.deb 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer http://security.ubuntu.com/ubuntu/pool/main/g/gcc-8/libstdc++6_8.3.0-6ubuntu1~18.10.1_i386.deb 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-i386_2.28-0ubuntu1_amd64.deb 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libtinfo5_6.1+20180210-4ubuntu1_i386.deb 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer http://fr.archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncurses5_6.1+20180210-4ubuntu1_i386.deb 404 Not Found [IP : 2001:860:f70a::2 80] E: Impossible de récupérer certaines archives, peut-être devrez-vous lancer apt-get update ou essayer avec --fix-missing ?

3/ On web page: Install and build GroundSdk - 7.3
`
=> / Clone the GroundSdk workspace /
=>=> Command “$ repo init -u GitHub - Parrot-Developers/groundsdk-manifest: This is the global manifest for Parrot Ground SDK.
=>=>=> doesn’t work
warning: gpg (GnuPG) is not available.
warning: Installing it is strongly encouraged.
warning: templates not found /build/git-repo-publish/parts/git/install/usr/share/git-core/templates
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get git-repo - Git at Google
remote: Counting objects: 2, done
remote: Finding sources: 100% (107/107)
remote: Total 107 (delta 42), reused 107 (delta 42)
Receiving objects: 100% (107/107), 186.00 KiB | 0 bytes/s, done.
Resolving deltas: 100% (42/42), completed with 12 local objects.
From git-repo - Git at Google
d38300c…58ac167 master → origin/master
0b57eed…d957ec6 stable → origin/stable

  • [new tag] v2.4 → v2.4
  • [new tag] v2.4.1 → v2.4.1
    Traceback (most recent call last):
    File “/home/rv/groundsdk/.repo/repo/main.py”, line 49, in
    import event_log
    File “/home/rv/groundsdk/.repo/repo/event_log.py”, line 167, in
    _EVENT_ID = multiprocessing.Value(‘i’, 1)
    File “/snap/git-repo/18/usr/lib/python2.7/multiprocessing/init.py”, line 253, in Value
    return Value(typecode_or_type, *args, **kwds)
    File “/snap/git-repo/18/usr/lib/python2.7/multiprocessing/sharedctypes.py”, line 108, in Value
    lock = RLock()
    File “/snap/git-repo/18/usr/lib/python2.7/multiprocessing/init.py”, line 183, in RLock
    return RLock()
    File “/snap/git-repo/18/usr/lib/python2.7/multiprocessing/synchronize.py”, line 172, in init
    SemLock.init(self, RECURSIVE_MUTEX, 1, 1)
    File “/snap/git-repo/18/usr/lib/python2.7/multiprocessing/synchronize.py”, line 75, in init
    sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
    OSError: [Errno 13] Permission denied`

~/groundsdk$ sudo repo init -u GitHub - Parrot-Developers/groundsdk-manifest: This is the global manifest for Parrot Ground SDK.
/snap/git-repo/18/usr/bin/python: can’t open file ‘/home/rv/groundsdk/.repo/repo/main.py’: [Errno 13] Permission denied`

Best regards.

I think you are using Ubuntu 'Cosmic" 18.10 which is not supported.

GroundSdk Android has been tested on Ubuntu 18.04

1 Like

OK. Is it a way to go from 18.10 to 18.04 ? or can I hope that 18.10 will be soon supported ?

Nope, as the 18.10 release of Ubuntu is obsolete.

https://wiki.ubuntu.com/Releases

You need to install 18.04 which is a LTS version until 2028!

OK. It is very clear. I’ll install the correct Ubuntu version. Thank you.

Hello and thank you for your support. It is true that it was silly not to have taken immediately the right version of OS … So!
After installing Ubuntu 18.04 LTS I made great progress in installing and building the GroundSDK.
At the “Build GroundSdk” step, on the command “./build.sh -p groundsdk-android -t build -j”, after hundreds of pages of apparently correct messages, I end up with a not very reassuring message:
"BUILD FAILED in 3m 36s
[E] Task ‘build’ failed (Command failed (returncode = 1)) "
Do you think this is a serious doctor?
Below the last 2 pages before the end.

Unzipping /home/rv/.gradle/wrapper/dists/gradle-5.6.2-all/55h7pv072ue5eoa6s30931prb7/gradle-5.6.2-all.zip to /home/rv/.gradle/wrapper/dists/gradle-5.6.2-all/55h7pv072ue5eoa6s30931prb7
Set executable permissions for: /home/rv/.gradle/wrapper/dists/gradle-5.6.2-all/55h7pv072ue5eoa6s30931prb7/gradle-5.6.2/bin/gradle

Welcome to Gradle 5.6.2!

Here are the highlights of this release:

  • Incremental Groovy compilation
  • Groovy compile avoidance
  • Test fixtures for Java projects
  • Manage plugin versions via settings script

For more details see Gradle 5.6.2 Release Notes

Starting a Gradle Daemon (subsequent builds will be faster)

Configure project :groundsdk
File /home/rv/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 28.0.3 in /home/rv/Android/Sdk/licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
Checking the license for package Android SDK Platform 28 in /home/rv/Android/Sdk/licenses
Warning: License for package Android SDK Platform 28 not accepted.

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/home/rv/groundsdk/packages/groundsdk-android/groundsdk/build.gradle’ line: 47

  • What went wrong:
    A problem occurred configuring project ‘:groundsdk’.

Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
platforms;android-28 Android SDK Platform 28
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see Exporting licenses - Android Studio Project Site

Using Android SDK: /home/rv/Android/Sdk

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 3m 36s
[E] Task ‘build’ failed (Command failed (returncode=1))

Did you follow all those steps?
https://developer.parrot.com/docs/groundsdk-android/buildgroundsdk.html#environment-setup

Linux

GroundSdk Android has been tested on Ubuntu 18.04. You should adapt some commands to your Linux distribution.

Download the latest Android Studio, and unpack it to /opt

Note

GroundSdk has been successfully tested with Android Studio 3.4

Follow the installation instructions for Linux, which include downloading Android SDK components.

Download Android NDK Revision 17c for Linux, and unpack it to /opt

Note

GroundSdk will not build with newer NDK revisions. That’s why you should not install NDK from Android Studio SDK Manager.

Note that you can still have several NDK revisions installed on your computer, you just have to reference the 17c revision as described below.

Permanently set environment variables (this will modify your ~/.profile file) with the following commands

$ echo export JAVA_HOME=/opt/android-studio/jre >> ~/.profile $ echo export ANDROID_HOME=~/Android/Sdk >> ~/.profile $ echo export ANDROID_SDK_PATH=~/Android/Sdk >> ~/.profile $ echo export ANDROID_NDK_PATH=/opt/android-ndk-r17c >> ~/.profile

Note

You should use the Android Studio embedded JDK as shown in this example.

You can find the default Android SDK path in Android Studio settings, in Appearance & Behavior > System Settings > Android SDK

Reload the .profile file to take your changes into account

$ . ~/.profile

Install the required tools

$ sudo apt install git python python3 make pkg-config

Install the Repo tool

  • Download it from Google APIs
  • Put it in a directory that is included in your path
  • Make it executable with chmod a+x repo

Configure git with your real name and email address

$ git config --global user.name “Your Name”
$ git config --global user.email "you@example

1 Like

Yes, I have. In Androïd Studio I retreive the same last messages:


A story of licence not accpeted, no value specified for “this provide” ???
BR.

Well, accepting the Android license might be a good start… ?

Yes certainly, but that is to say? Where / when should we accept something related to a license? Not seen ?

I am sorry, this does not seems to be a GroundSDK issue , this comes from your installation of Linux/Android Studio/Android SDK.
I just tested the whole procedure and it works fine.
I would suggest to start from scratch on a clean linux install and follow all tutorials 1 by 1 (groundSDK and Android Studio/SDK).
Good luck! :upside_down_face:

OK. I will try again. thank you.

I’ll think there is a problem with the version of Android build-tools required by build in android studio AND the one installed on my machine (using given procedure).
Indeed, i have ~/Android/Sdk/build-tools/29.0.3 directory but Android build seems to look for 28.0.3 version… ??? Amazing isn’t it?

truly mind blowing :exploding_head:

Hello,

Following the procedure Install and build GroundSdk - 7.3 always results in the same problem of non acceptance of license (28): it does not come from my installation and is useless to start again "from scratch ".
On the other hand, it is indeed an Android SDK reference (“Pie” / API level 28) from the GIT groudSDK not synchronous with that installed by default in the installation of the latest version of Android Studio 3.6 (the "Q "/ API level 29). The API level 28 (“Pie”) was probably the one installed by default by Android Studio 3.4 (version as indicated in the tutorial) except that I did not find this version now apparently obsolete …
So I simply request the installation of the API Level 28 version via checkbox in Tools / SDK Manager and everything went in order:
1 / Compilation OK
2 / Installation: Some traditional problems due to the validation of the APK depending on the Android version intalled on the target device (SmartPhone X or Y …)
3 / Unable to detect the WiFi network of the drone’s AP (recurring problem still causing a lot of ink on the Net, in which I fell twice but which is no longer one in done now … we are progressing!).
4/ Launch of the APK groundSDKdemo: very good !!!
So, in my opinion, it would be cool to indicate that it is necessary to intervene post installation of Android STudio to install the right version of Android SDK … Otherwise do something smarter side GIT GroudSDKdemo …

Now, coming back to the main subject of all these exchanges, thank you for your help, because I really appreciated this extremely complete GroudSDKdemo application … Very nice.
I am now going on the paths of reading the code … I have here for a moment, a long journey probably very informative on what is a ground app for ANAFI …

1 Like

Thanks for the update!
Note that you can find all Android Studio version here

1 Like

Some observations here.

I have been building groundsdk on OS X for quite some time. I’m currently using Android Studio v3.6.1, compile the SDK via command line, and maintain the Android java package with zero issues in an Android Studio workspace.

I use Gradle 6.0.1 (android 3.6.1 plugin) without issue within my workspace and 5.6.2 (android 3.5.0 plugin) via the groundsdk build system (as specified in build.gradle and grade-wrapper.properties within groundsdk-products).

This is really easy to fix and has nothing to do with groundsdk. It’s simply because you have not accepted all the appropriate license terms in Android Studio and / or do not have at least v28.0.3 of the android build-tools installed.

You can keep track of what (minimum) version of the build tools is required by the Gradle plugin by following its release notes. See here for more details: Notas de la versión del complemento de Android para Gradle

And some screenshots so you know what to look for:

one final note… groundsdk does target and compile @ API 28:

Android Studio 3.6.1 defaults to higher API level so it actually makes perfect sense why your build was failing.

And since the buildSdkVersion almost never specified these days, I bet Android defaults to a build-tools version that matches your compileSdkVersion.

  /**
   * buildToolsVersion specifies the version of the SDK build tools, command-line
   * utilities, and compiler that Gradle should use to build your app. You need to
   * download the build tools using the SDK Manager.
   *
   * This property is optional because the plugin uses a recommended version of
   * the build tools by default.
   */

  buildToolsVersion "29.0.2"

Here’s my SDK Platforms:

@Jerome, it may be worthwhile to just bump up the target and compile Sdk versions to 29 as Google is pushing us all there anyway.

1 Like

Hello, and thank you for all these new details … If I have really developed a lot in my life, I am not hot with Android, as to know immediately where is the little beast that produces the inconsistency of the system. But doing quantum mechanics precisely with Q-bits, inconsistency is my bane, I fight it every day of my life … Thus, any contribution allowing to increase the maintenance of the coherence of a system in time is essential for me, after all that is life, maintaining the coherence of himself.
Thank you again and probably to other meetings (once I have done a round or two of groudSDKdemo world).

1 Like