rosjava / android_core

Android libraries for rosjava
144 stars 166 forks source link

cannot compile with the latest Indigo branch from rosjava #229

Closed vrabaud closed 9 years ago

vrabaud commented 9 years ago

I actually get the following error in catkin after a catkin_make (and following properly the instructions of the tutorials):

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - android_core
-- ~~  - android_apps
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'android_core'
-- ==> add_subdirectory(android_core)
-- +++ processing catkin package: 'android_apps'
-- ==> add_subdirectory(android_apps)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vrabaud/ros/ws_android/ws_android/build
####
#### Running command: "make -j4 -l4" in "/home/vrabaud/ros/ws_android/ws_android/build"
####
Scanning dependencies of target gradle-android_core

FAILURE: Build failed with an exception.

* Where:
Build file '/home/vrabaud/ros/ws_android/ws_android/src/android_core/build.gradle' line: 25

* What went wrong:
A problem occurred evaluating root project 'android_core'.
> org/codehaus/groovy/runtime/typehandling/ShortTypeHandling

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.578 secs
make[2]: *** [android_core/CMakeFiles/gradle-android_core] Error 1
make[1]: *** [android_core/CMakeFiles/gradle-android_core.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

Now, I managed to track down the crash at this line in the Catkin plugin:

https://github.com/rosjava/rosjava_bootstrap/blob/indigo/gradle_plugins/src/main/groovy/org/ros/gradle_plugins/CatkinPlugin.groovy#L167

The error is Caused by: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/typehandling/ShortTypeHandling. It does not make sense as the rest of rosjava works fine with that plugin.

I am actually opening a bug because I believe something simpler is happening. rosjava got updated to the latest gradle in https://github.com/rosjava/rosjava_bootstrap/commit/7d47ee42b4a00dd4bbceac80785b6e210fcab9ec but not the android_* packages, cf https://github.com/rosjava/android_core/blob/indigo/build.gradle#L18. BTW, a new gradle actually got released today, cf https://github.com/rosjava/rosjava_bootstrap/issues/42

Thx !

stonier commented 9 years ago

Getting there...caught in the middle of getting it all upgraded last week after android studio made a huge leap. I'll update here once I've got it working.

vrabaud commented 9 years ago

take your time, that works is awesome and very well documented. rosjava_* was a breeze to install. I just wanted to make sure you guys were aware of it :)

stonier commented 9 years ago

Confirmed I got the same error with the current code.

stonier commented 9 years ago

Just merged in alot of the code brought in by @talregev in #226. Also updated the gradle wrapper and this error's gone. Everything compiling nicely...and seems alot faster than I remember too. :neckbeard:

Haven't got to the other android stacks, nor uploaded these artifacts to the rosjava maven repo yet though.

vrabaud commented 9 years ago

and I can confirm all the android_* packages compile. Thx a bunch @talregev !

talregev commented 9 years ago

@vrabaud you're welcome

vrabaud commented 9 years ago

and https://github.com/rosjava/android_apps/pull/41 works for me too ! Thx !