注册 登录
编程论坛 Android开发

android 开发真机调试闪退问题——(开发平台android studio)

winner1995 发布于 2018-01-08 13:56, 2797 次点击
昨天还能好好运行的程序,今天每次都闪退
错误日志:
01-08 13:52:30.507 18604-18604/com.sto.courier E/AndroidRuntime: FATAL EXCEPTION: main
                                                                 Process: com.sto.courier, PID: 18604
                                                                 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sto.courier/com.sto.courier.act.MainAct}: java.lang.RuntimeException: Unable to bind views for com.sto.courier.act.MainAct
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2808)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2873)
                                                                     at android.app.ActivityThread.access$900(ActivityThread.java:181)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1482)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:145)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:6145)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
                                                                  Caused by: java.lang.RuntimeException: Unable to bind views for com.sto.courier.act.MainAct
                                                                     at butterknife.ButterKnife.bind(ButterKnife.java:189)
                                                                     at butterknife.ButterKnife.bind(ButterKnife.java:122)
                                                                     at com.sto.courier.base.BaseAct.onCreate(BaseAct.java:24)
                                                                     at android.app.Activity.performCreate(Activity.java:6374)
                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2752)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2873)
                                                                     at android.app.ActivityThread.access$900(ActivityThread.java:181)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1482)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:145)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:6145)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
                                                                  Caused by: java.lang.IllegalStateException: Required view 'im_button' with ID 2131689659 for field 'imageButton' was not found. If this view is optional add '@Nullable' (fields) or '@Optional' (methods) annotation.
                                                                     at butterknife.internal.Finder.findRequiredView(Finder.java:51)
                                                                     at com.sto.courier.act.MainAct$$ViewBinder.bind(MainAct$$ViewBinder.java:17)
                                                                     at com.sto.courier.act.MainAct$$ViewBinder.bind(MainAct$$ViewBinder.java:12)
                                                                     at butterknife.ButterKnife.bind(ButterKnife.java:187)
                                                                     at butterknife.ButterKnife.bind(ButterKnife.java:122)
                                                                     at com.sto.courier.base.BaseAct.onCreate(BaseAct.java:24)
                                                                     at android.app.Activity.performCreate(Activity.java:6374)
                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2752)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2873)
                                                                     at android.app.ActivityThread.access$900(ActivityThread.java:181)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1482)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:145)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:6145)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
01-08 13:52:30.817 18604-19511/com.sto.courier I/System.out: LogContext.upload calls detatch()
01-08 13:52:30.817 18604-19515/com.sto.courier I/LogStrategyManager: [LogStrategyManager.request] revertRequestSpanToNormal: 1800000
01-08 13:52:30.817 18604-19511/com.sto.courier E/MdapLogUploadManager: [LogContext.upload] crash upload failed: 1515390750316_com.sto.courier-main_crash at java.lang.IllegalStateException: responseContent code is 201
01-08 13:52:30.817 18604-19511/com.sto.courier I/MdapLogUploadManager: [LogContext.upload] uploadLog end, realUploadCount: 0
01-08 13:52:30.827 18604-19511/com.sto.courier W/MdapLogUploadManager: [LogContext.upload] 1 errorUploadCount, all the uploading are failed ! lastErrorMessage: java.lang.IllegalStateException: responseContent code is 201
01-08 13:52:30.827 18604-18742/com.sto.courier E/Appender: dataflow first append: [just check, not a real error] /data/data/com.sto.courier/files/mdap/com.sto.courier-main_dataflow: open failed: ENOENT (No such file or directory)
01-08 13:52:30.827 18604-19515/com.sto.courier I/System.out: LogStrategyManager.request calls detatch()
01-08 13:52:30.827 18604-19515/com.sto.courier E/LogStrategyManager: [LogStrategyManager.request] syncRequestLogConfig: serverLogicCode is not 200, {"code":"500","msg":"PARAM ILLEGAL"}
01-08 13:52:32.707 18604-18604/com.sto.courier I/Process: Sending signal. PID: 18604 SIG: 9
1 回复
#2
winner19952018-01-08 13:57
程序代码:
01-08 13:52:30.507 18604-18604/com.sto.courier E/AndroidRuntime: FATAL EXCEPTION: main
                                                                 Process: com.sto.courier, PID: 18604
                                                                 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sto.courier/com.sto.courier.act.MainAct}: java.lang.RuntimeException: Unable to bind views for com.sto.courier.act.MainAct
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2808)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2873)
                                                                     at android.app.ActivityThread.access$900(ActivityThread.java:181)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1482)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:145)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:6145)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
                                                                  Caused by: java.lang.RuntimeException: Unable to bind views for com.sto.courier.act.MainAct
                                                                     at butterknife.ButterKnife.bind(ButterKnife.java:189)
                                                                     at butterknife.ButterKnife.bind(ButterKnife.java:122)
                                                                     at com.sto.courier.base.BaseAct.onCreate(BaseAct.java:24)
                                                                     at android.app.Activity.performCreate(Activity.java:6374)
                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2752)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2873)
                                                                     at android.app.ActivityThread.access$900(ActivityThread.java:181)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1482)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:145)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:6145)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
                                                                  Caused by: java.lang.IllegalStateException: Required view 'im_button' with ID 2131689659 for field 'imageButton' was not found. If this view is optional add '@Nullable' (fields) or '@Optional' (methods) annotation.
                                                                     at butterknife.internal.Finder.findRequiredView(Finder.java:51)
                                                                     at com.sto.courier.act.MainAct$$ViewBinder.bind(MainAct$$ViewBinder.java:17)
                                                                     at com.sto.courier.act.MainAct$$ViewBinder.bind(MainAct$$ViewBinder.java:12)
                                                                     at butterknife.ButterKnife.bind(ButterKnife.java:187)
                                                                     at butterknife.ButterKnife.bind(ButterKnife.java:122)
                                                                     at com.sto.courier.base.BaseAct.onCreate(BaseAct.java:24)
                                                                     at android.app.Activity.performCreate(Activity.java:6374)
                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2752)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2873)
                                                                     at android.app.ActivityThread.access$900(ActivityThread.java:181)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1482)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:145)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:6145)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
01-08 13:52:30.817 18604-19511/com.sto.courier I/System.out: LogContext.upload calls detatch()
01-08 13:52:30.817 18604-19515/com.sto.courier I/LogStrategyManager: [LogStrategyManager.request] revertRequestSpanToNormal: 1800000
01-08 13:52:30.817 18604-19511/com.sto.courier E/MdapLogUploadManager: [LogContext.upload] crash upload failed: 1515390750316_com.sto.courier-main_crash at java.lang.IllegalStateException: responseContent code is 201
01-08 13:52:30.817 18604-19511/com.sto.courier I/MdapLogUploadManager: [LogContext.upload] uploadLog end, realUploadCount: 0
01-08 13:52:30.827 18604-19511/com.sto.courier W/MdapLogUploadManager: [LogContext.upload] 1 errorUploadCount, all the uploading are failed ! lastErrorMessage: java.lang.IllegalStateException: responseContent code is 201
01-08 13:52:30.827 18604-18742/com.sto.courier E/Appender: dataflow first append: [just check, not a real error] /data/data/com.sto.courier/files/mdap/com.sto.courier-main_dataflow: open failed: ENOENT (No such file or directory)
01-08 13:52:30.827 18604-19515/com.sto.courier I/System.out: LogStrategyManager.request calls detatch()
01-08 13:52:30.827 18604-19515/com.sto.courier E/LogStrategyManager: [LogStrategyManager.request] syncRequestLogConfig: serverLogicCode is not 200, {"code":"500","msg":"PARAM ILLEGAL"}
01-08 13:52:32.707 18604-18604/com.sto.courier I/Process: Sending signal. PID: 18604 SIG: 9
1