下面我给出了Logcat中打印的所有崩溃日志。我在按钮的onclicklister上用下面的代码崩溃了应用程序。服务器正在运行,设备和服务器在同一个wifi网络中。
throw new RuntimeException("This is a crash");
我为Acralyzer安装了两次,没有发现我的错误。我用自己的笔记本电脑托管服务器。
如果有人需要更多的详细信息,我愿意发布。我用作指南的所有与服务器相关的详细信息都在这里服务器中也没有显示任何报告。
Logcat日志
E/ACRA: ACRA caught a RuntimeException for com.example.sys.myapplication
java.lang.RuntimeException: This is a crash
at com.example.sys.myapplication.MainActivity$3.onClick(MainActivity.java:111)
at android.view.View.performClick(View.java:5207)
at android.view.View$PerformClick.run(View.java:21168)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.sys.myapplication, PID: 16543
java.lang.RuntimeException: This is a crash
at com.example.sys.myapplication.MainActivity$3.onClick(MainActivity.java:111)
at android.view.View.performClick(View.java:5207)
at android.view.View$PerformClick.run(View.java:21168)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
W/System: ClassLoader referenced unknown path: /data/app/com.example.sys.myapplication-2/lib/arm
W/System: ClassLoader referenced unknown path: /data/app/com.example.sys.myapplication-2/lib/arm
E/InstantRun: IO Error creating local socket at com.example.sys.myapplication
java.io.IOException: Address already in use
at android.net.LocalSocketImpl.bindLocal(Native Method)
at android.net.LocalSocketImpl.bind(LocalSocketImpl.java:309)
at android.net.LocalServerSocket.<init>(LocalServerSocket.java:48)
at com.android.tools.fd.runtime.Server.<init>(Server.java:94)
at com.android.tools.fd.runtime.Server.create(Server.java:88)
at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:315)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1036)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4728)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1415)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I/ACRA: Sending report /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T18:44:37.046+05:30.stacktrace
E/ACRA: Failed to send crash report for /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T18:44:37.046+05:30.stacktrace
org.acra.sender.ReportSenderException: Error while sending JSON report via Http POST
at org.acra.sender.HttpSender.send(HttpSender.java:236)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102)
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70)
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 5984) after 5000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:452)
at java.net.Socket.connect(Socket.java:884)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:117)
at com.android.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)
at com.android.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)
at com.android.okhttp.Connection.connect(Connection.java:152)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
at org.acra.util.HttpRequest.send(HttpRequest.java:142)
at org.acra.sender.HttpSender.send(HttpSender.java:233)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102)
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70)
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
I/ACRA: Sending report /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:02:07.897+05:30.stacktrace
E/ACRA: Failed to send crash report for /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:02:07.897+05:30.stacktrace
org.acra.sender.ReportSenderException: Error while sending JSON report via Http POST
at org.acra.sender.HttpSender.send(HttpSender.java:236)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102)
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70)
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 5984) after 5000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:452)
at java.net.Socket.connect(Socket.java:884)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:117)
at com.android.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)
at com.android.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)
at com.android.okhttp.Connection.connect(Connection.java:152)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
at org.acra.util.HttpRequest.send(HttpRequest.java:142)
at org.acra.sender.HttpSender.send(HttpSender.java:233)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102)
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70)
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
I/ACRA: Sending report /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:03:58.007+05:30.stacktrace
E/ACRA: Failed to send crash report for /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:03:58.007+05:30.stacktrace
org.acra.sender.ReportSenderException: Error while sending JSON report via Http POST
at org.acra.sender.HttpSender.send(HttpSender.java:236)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102)
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70)
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 5984) after 5000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:452)
at java.net.Socket.connect(Socket.java:884)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:117)
at com.android.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)
at com.android.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)
at com.android.okhttp.Connection.connect(Connection.java:152)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
at org.acra.util.HttpRequest.send(HttpRequest.java:142)
at org.acra.sender.HttpSender.send(HttpSender.java:233)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102)
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70)
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
I/ACRA: Sending report /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:20:27.024+05:30.stacktrace
日志非常清楚:
java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 5984)
ACRA无法访问服务器。
您可以检查是否可以从普通的移动浏览器访问服务器,以确定问题的位置。
对于那些可能会遇到同样问题的人,以下是我所做的。默认情况下,Couchdb只侦听本地主机。您可以通过设置从bind_address=127.0.0.1到bind_address=0.0.0.0来启用对远程设备或其他系统的侦听。这些文件可以在C:\Program files(x86)\Apache Software Foundation\CuchDB\etc\cochdb下找到,default.ini和local.ini 顺便说一句,这还没有解决我的全部问题。现在我可以将请求发送到服务器了。但Acralyzer Dashboard没有显示插入数据的详细信息。我还不确定数据插入是否正确。