0

下面我给出了在 Logcat 中打印的所有崩溃日志。我在按钮的 onclicklistener 上使用以下代码使应用程序崩溃。服务器正在运行,设备和服务器在同一个 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
4

2 回答 2

1

日志很清楚:

java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 5984)

ACRA 无法访问服务器。

您可以检查是否可以从普通的移动浏览器访问服务器以确定问题位置。

于 2016-05-05T14:13:56.003 回答
0

对于那些可能遇到同样问题的人,这就是我所做的。默认情况下,Couchdb 仅侦听 localhost。您可以通过将bind_address = 127.0.0.1设置为bind_address = 0.0.0.0来启用对远程设备或其他系统的侦听。这些文件可以在C:\Program Files (x86)\Apache Software Foundation\CouchDB\etc\couchdbdefault.inilocal.ini下找到。对我来说,检查它是 default.ini 和 local.ini 文件,它被注释掉了。local.ini 文件设置将覆盖 default.ini 文件,如 local.ini 文件文档中所述。

顺便说一句,这还没有解决我的整个问题。现在我可以将请求发送到服务器。但是 Acralyzer 仪表板没有显示插入数据的详细信息。而且我还不确定数据是否正确插入。

于 2016-05-06T05:31:48.557 回答