ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi @MarkusHHN,

Yes, Android core and in general any ROS-Android projects are being created with an older Gradle version and Android plugin. Unfortunately, a manual upgrade won't be trivial (at least I guess you may find some issues in your way). Here's some guidelines: Try using android_core from source when you build your application (i.e., include that package in the same workspace of your application). Go to the top level gradle buildscript of your application and modify both the Gradle version and the buildscript block. You may need to regenerate the wrapper with an installed Gradle in your system (install Gradle from apt, generate new wrappers and place them in the folder where the old wrappers were). The standard buildscript block points to https://github.com/rosjava/android_core/blob/kinetic/buildscript.gradle, which specifies Android plugin 2.2.3. You will probably need to change that.

Finally, you may need to upgrade the buildToolsVersion in the bottom level Gradle script.

Note: Upgrading the Gradle version to 4.x and the Android-Gradle plugin to support newer devices would be interesting; the problem is that the new build tools deprecated one of the command line tools used to create projects (see here: https://github.com/rosjava/android_core/issues/270#issuecomment-359979204).

Hi @MarkusHHN,

Yes, Android core and in general any ROS-Android projects are being created with an older Gradle version and Android plugin. Unfortunately, a manual upgrade won't be trivial (at least I guess you may find some issues in your way). Here's some guidelines: Try using android_core from source when you build your application (i.e., include that package in the same workspace of your application). Go to the top level gradle buildscript of your application and modify both the Gradle version and the buildscript block. You may need to regenerate the wrapper with an installed Gradle in your system (install Gradle from apt, generate new wrappers and place them in the folder where the old wrappers were). The standard buildscript block points to https://github.com/rosjava/android_core/blob/kinetic/buildscript.gradle, which specifies Android plugin 2.2.3. You will probably need to change that.

Finally, you may need to upgrade the buildToolsVersion in the bottom level Gradle script.

Note: Upgrading the Gradle version to 4.x and the Android-Gradle plugin to support newer devices would be interesting; the problem is that the new build tools deprecated one of the command line tools used to create projects (see here: https://github.com/rosjava/android_core/issues/270#issuecomment-359979204).

EDIT: see https://github.com/rosjava/android_core/pull/286.