为了账号安全,请及时绑定邮箱和手机立即绑定

程序滑动两次之后停止运行

04/14 17:00:35: Launching app

$ adb push F:\Android\AGV_system\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.administrator.agv_system

$ adb shell pm install -r "/data/local/tmp/com.example.administrator.agv_system"

Success



$ adb shell am start -n "com.example.administrator.agv_system/com.example.administrator.agv_system.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

Client not ready yet..Waiting for process to come online

Waiting for process to come online

Waiting for process to come online

Connected to process 2337 on device emulator-5554

W/System: ClassLoader referenced unknown path: /data/app/com.example.administrator.agv_system-2/lib/x86

W/art: Verification of void android.support.v4.view.ViewPager.completeScroll(boolean) took 109.803ms

W/gralloc_ranchu: Gralloc pipe failed


                  [ 04-14 09:04:46.209  2337: 2337 D/         ]

                  HostConnection::get() New Host Connection established 0xa171d140, tid 2337

I/OpenGLRenderer: Initialized EGL, version 1.4

D/OpenGLRenderer: Swap behavior 1

I/Choreographer: Skipped 104 frames!  The application may be doing too much work on its main thread.

D/AndroidRuntime: Shutting down VM


<!--下面的是红色部分-->

                  --------- beginning of crash

E/AndroidRuntime: FATAL EXCEPTION: main

                  Process: com.example.administrator.agv_system, PID: 2337

                  java.lang.UnsupportedOperationException: Required method destroyItem was not overridden

                      at android.support.v4.view.PagerAdapter.destroyItem(PagerAdapter.java:196)

                      at android.support.v4.view.PagerAdapter.destroyItem(PagerAdapter.java:125)

                      at com.example.administrator.agv_system.MainActivity$1.destroyItem(MainActivity.java:73)

                      at android.support.v4.view.ViewPager.populate(ViewPager.java:1174)

                      at android.support.v4.view.ViewPager.populate(ViewPager.java:1088)

                      at android.support.v4.view.ViewPager$3.run(ViewPager.java:275)

                      at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)

                      at android.view.Choreographer.doCallbacks(Choreographer.java:683)

                      at android.view.Choreographer.doFrame(Choreographer.java:616)

                      at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)

                      at android.os.Handler.handleCallback(Handler.java:751)

                      at android.os.Handler.dispatchMessage(Handler.java:95)

                      at android.os.Looper.loop(Looper.java:154)

                      at android.app.ActivityThread.main(ActivityThread.java:6077)

                      at java.lang.reflect.Method.invoke(Native Method)

                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)

                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

Application terminated.


正在回答

2 回答

把destroyItem方法里面的super()这句话删掉就正常了


1 回复 有任何疑惑可以回复我~

我是用Android studio运行的。没有报错,但是有警告,运行之后滑动两次就会显示“很抱歉,XXX停止运行”,求大神指点

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
多种多样的App主界面Tab实现方法
  • 参与学习       48925    人
  • 解答问题       179    个

本课程就将讲解迄今为止最流行的4种实现Tab的方法

进入课程

程序滑动两次之后停止运行

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信