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

android_tutorial_pubsub errors in eclipse and adb logcat

asked 2012-01-19 16:01:23 -0600

Srogacki gravatar image

updated 2012-01-19 16:02:39 -0600

I can rosmake, ant, and ant debug android_tutorial_pubsub without error. I can install the .apk on my android phone just fine, but when I attempt to run the app, it crashes immediately.

I ran a adb logcat to locate the error. I received a number of errors. They are the same errors received during my attempts to run the app in eclipse.

Do I need to go through an extra build process in order to get a complete app on the phone?

Any help or guidance would be greatly appreciated.


The logcat of errors follow:

01-19 23:08:00.520 2154 2154 E AndroidRuntime: FATAL EXCEPTION: main 01-19 23:08:00.520 2154 2154 E AndroidRuntime: java.lang.Error: Unresolved compilation problems: 01-19 23:08:00.520 2154 2154 E AndroidRuntime: The import org.ros.android.MessageCallable cannot be resolved 01-19 23:08:00.520 2154 2154 E AndroidRuntime: The import org.ros.android.RosActivity cannot be resolved 01-19 23:08:00.520 2154 2154 E AndroidRuntime: The import org.ros.android.views cannot be resolved 01-19 23:08:00.520 2154 2154 E AndroidRuntime: The import org.ros.tutorials.pubsub.R cannot be resolved 01-19 23:08:00.520 2154 2154 E AndroidRuntime: RosActivity cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: RosTextView cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: The method onCreate(Bundle) of type MainActivity must override or implement a supertype method 01-19 23:08:00.520 2154 2154 E AndroidRuntime: RosActivity cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: R cannot be resolved to a variable 01-19 23:08:00.520 2154 2154 E AndroidRuntime: RosTextView cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: RosTextView cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: R cannot be resolved to a variable 01-19 23:08:00.520 2154 2154 E AndroidRuntime: RosTextView cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: RosTextView cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: RosTextView cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: MessageCallable cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: The method call(String) of type new MessageCallable<string,string>(){} must override or implement a supertype method 01-19 23:08:00.520 2154 2154 E AndroidRuntime: The method init(NodeMainExecutor) of type MainActivity must override or implement a supertype method -19 23:08:00.520 2154 2154 E AndroidRuntime: RosTextView cannot be resolved to a type 01-19 23:08:00.520 2154 2154 E AndroidRuntime: The method onDestroy() of type MainActivity must override or implement a supertype method 01-19 23:08:00.520 2154 2154 E AndroidRuntime: RosActivity cannot be resolved to a type 01-19 23:08 ... (more)

edit retag flag offensive close merge delete

Comments

Which version of the android tools are you using? What version of android are you running on your device? When you say "run in eclipse" do you really mean "run in the android simulator"?
ahendrix gravatar image ahendrix  ( 2012-01-19 16:41:32 -0600 )edit
I am using SDK tools rev 16, and I have the platform installed for versions 9, 10, 13, and 15. My device is running 2.3.3. When I say "run in eclipse" I mean selecting "run as android application" which should install the app on my device and run it.
Srogacki gravatar image Srogacki  ( 2012-01-20 01:57:01 -0600 )edit
The errors in eclipse show up as build and compile errors prior to running, but the app will still build outside of eclipse.
Srogacki gravatar image Srogacki  ( 2012-01-20 01:58:53 -0600 )edit
thanks for the help. I went back to ensure that the android_gingerbread package was not only being referenced, but also included in the app installation.
Srogacki gravatar image Srogacki  ( 2012-01-20 03:45:38 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-01-20 03:44:35 -0600

Srogacki gravatar image

I explicitly included android_gingerbread on the build path of android_tutorial_pubsub instead of just letting eclipse grab references from the open project. This seems to have solved the problem. I ran the program out of eclipse onto my device. It took a little while, but after a minute or two it showed up on the device.

edit flag offensive delete link more
0

answered 2012-09-20 21:52:41 -0600

steven7 gravatar image

Hello,i also facing the same problem. can you mention the step to explicitly included android_gingerbread on the build path of android_tutorial_pubsub instead of just letting eclipse grab references from the open project.

edit flag offensive delete link more

Comments

right click on the project, go to build path, click "configure build path," then hit the projects tab and add the android_gingerbread project

Srogacki gravatar image Srogacki  ( 2012-10-16 03:18:42 -0600 )edit

Question Tools

Stats

Asked: 2012-01-19 16:01:23 -0600

Seen: 1,551 times

Last updated: Sep 20 '12