SilenceWangJiang
2017-04-15 07:49
采纳率: 66.7%
浏览 1.0k

小白求助各位大神安卓远程通信服务出现这个错误该怎么办

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.wangjiang.testaidl, PID: 7426
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wangjiang.testaidl/com.wangjiang.testaidl.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.List com.wangjiang.service.IService.getData()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.List com.wangjiang.service.IService.getData()' on a null object reference
at com.wangjiang.testaidl.MainActivity.onCreate(MainActivity.java:32)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
at android.app.ActivityThread.-wrap11(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5417) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • qq_36522073 2017-04-15 08:51
    已采纳

    Iservice为空啊 你检查下

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题