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

got dx warning while building android_tutorial_teleop in android_core

asked 2012-05-19 10:01:44 -0500

ira gravatar image

updated 2012-05-19 10:07:11 -0500

Hi,

I followed the instructions on the webpage(http://docs.rosjava.googlecode.com/hg/rosjava_core/html/index.html and http://docs.rosjava.googlecode.com/hg/android_core/html/index.html) to download, install and build rosjava and android_core on my computer. I got 100% "BUILD SUCCESSFUL" except a bunch of warnings while building android_tutorial_% package. The warning all look like these:

[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (jnamed$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.

Also, when I import the android_tutorial_image_transport into eclipse, I can not launch it in the emulator and got the following errors:

E/AndroidRuntime(428): FATAL EXCEPTION: main

E/AndroidRuntime(428): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.ros.android.android_tutorial_image_transport/org.ros.android.android_tutorial_image_transport.MainActivity}: java.lang.ClassNotFoundException: org.ros.android.android_tutorial_image_transport.MainActivity in loader dalvik.system.PathClassLoader[/data/app/org.ros.android.android_tutorial_image_transport-1.apk]

E/AndroidRuntime(428):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
E/AndroidRuntime(428):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
E/AndroidRuntime(428):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime(428):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime(428):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(428):  at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(428):  at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime(428):  at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(428):  at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(428):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime(428):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime(428):  at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime(428): Caused by: java.lang.ClassNotFoundException: org.ros.android.android_tutorial_image_transport.MainActivity in loader dalvik.system.PathClassLoader[/data/app/org.ros.android.android_tutorial_image_transport-1.apk]

E/AndroidRuntime(428):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
E/AndroidRuntime(428):  at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
E/AndroidRuntime(428):  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime(428):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(428):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
E/AndroidRuntime(428):  ... 11 more
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-05-20 00:16:16 -0500

ira gravatar image

It turned out that there is a error that is not explicitly shown in the main.xml file, in which

org.ros.android.views.RosImageView

should be changed to

org.ros.android.view.RosImageView

But about the warning, I still hasn't figured it out.

edit flag offensive delete link more

Comments

The warning can be safely ignored.

damonkohler gravatar image damonkohler  ( 2012-05-21 06:00:34 -0500 )edit

Question Tools

Stats

Asked: 2012-05-19 10:01:44 -0500

Seen: 1,144 times

Last updated: May 20 '12