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

Rosmater Chooser Problem

asked 2015-03-13 16:06:24 -0500

Anis gravatar image

Hello

I have created a new Android Studio then I added all needed dependency of android_core and rosjava_core in my project and updated the manifest. I wanted to execute the pub_sub tutorial code in my newly created project. All works fine, the code compile with no problem.

However, when I upload the code to the mobile phone, I always get an Exception as follows:

03-13 23:55:05.658 25522-25522/app.mybot.org.mybot E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: app.mybot.org.mybot, PID: 25522 java.lang.RuntimeException: Unable to start activity ComponentInfo{app.mybot.org.mybot/org.ros.android.MasterChooser}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2447) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2507) at android.app.ActivityThread.access$900(ActivityThread.java:172) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5692) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at org.ros.android.MasterChooser.onCreate(MasterChooser.java:78) at android.app.Activity.performCreate(Activity.java:5541) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2507)             at android.app.ActivityThread.access$900(ActivityThread.java:172)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:146)             at android.app.ActivityThread.main(ActivityThread.java:5692)             at java.lang.reflect.Method.invokeNative(Native Method)             at java.lang.reflect.Method.invoke(Method.java:515)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)             at dalvik.system.NativeStart.main(Native Method) 03-13 23:55:08.333 25522-25522/app.mybot.org.mybot I/Process﹕ Sending signal. PID: 25522 SIG: 9

I do not know why MasterChooser always java.lang.NullPointerException. The same code work fine in a project that I created inside android_core folder itself. But it does not execute on the folder of my project that is outside android_core folder, although I imported all dependencies and also the code compiles fine with no problem.

Any help will be appreciated Anis

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-01-20 12:47:21 -0500

ielson gravatar image

Hey, have you ever found out a solution to this problem? I'm facing the same issue here

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-03-13 16:06:24 -0500

Seen: 668 times

Last updated: Mar 13 '15