0
$\begingroup$

Rosanswers logo

Hello,

i have an existing application which i must upgrading from Android 6.0 to Android 8.1. I hasnt Problem to increase the targetSdkVersion to 26 (Android 8.0). But when i upgrade the targetSdkVesion to 27 (Android 8.1) then the crashes. I search for the problems and i found out that the problem is about the new notificationsystem. The roslibrary which is using some notification has the old system.

For the new Notificationsystem on Android 8.1 i need to add this library

dependencies { implementation "com.android.support:support-compat:27.1.1" }

But I need to upgrade the Android plugin and the gradle version. But i use an older gradle version for the roslibrary in Android Studio.

What I have to do to integrate the new Notificationsystem in Android 8.1 with the ros-library?

I know the question i generally but I hope I can get any tips.


Originally posted by MarkusHHN on ROS Answers with karma: 54 on 2018-04-18

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by jubeira with karma: 1054 on 2018-04-19

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by MarkusHHN on 2018-04-20:
thank you for your tip.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.