开发者社区> 问答> 正文

编码没有出错,但运行时显示停止运行

爵霸 2016-06-06 10:53:31 982
java.nio.BufferOverflowException 
     at java.nio.HeapByteBuffer.put(Unknown Source) 
     at com.android.ddmlib.JdwpPacket.movePacket(JdwpPacket.java:235) 
     at com.android.ddmlib.Debugger.sendAndConsume(Debugger.java:347) 
     at com.android.ddmlib.Client.forwardPacketToDebugger(Client.java:665) 
     at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:344) 

    at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263) 




10-18 16:28:24.705: E/AndroidRuntime(12342): FATAL EXCEPTION: main
 10-18 16:28:24.705: E/AndroidRuntime(12342): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.practise/com.example.practise.main}; have you declared this activity in your AndroidManifest.xml?
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1624)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1423)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.app.Activity.startActivityForResult(Activity.java:3388)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.app.Activity.startActivityForResult(Activity.java:3349)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.app.Activity.startActivity(Activity.java:3584)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.app.Activity.startActivity(Activity.java:3552)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at com.example.practise.MainActivity$1.onClick(MainActivity.java:30)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.view.View.performClick(View.java:4211)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.view.View$PerformClick.run(View.java:17446)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.os.Handler.handleCallback(Handler.java:725)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.os.Handler.dispatchMessage(Handler.java:92)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.os.Looper.loop(Looper.java:153)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at android.app.ActivityThread.main(ActivityThread.java:5299)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at java.lang.reflect.Method.invokeNative(Native Method)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at java.lang.reflect.Method.invoke(Method.java:511)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
 10-18 16:28:24.705: E/AndroidRuntime(12342):     at dalvik.system.NativeStart.main(Native Method)

这是什么错误,明明没有显示错误,但运行时就显示停止运行

分享到
取消 提交回答
全部回答(0)
+ 订阅

时时分享云计算技术内容,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。

推荐文章