我们正在开发一个使用ASP .net MVC构建的Web服务,现在我们想将崩溃发送到Hockey应用程序 website 我们应该使用他们的公共API。 我已按照所有说明进行操作,但当我尝试从curl发送日志文件时,我使用以下代码并发送日志文件
curl -F "log=@log.log" https://rink.hockeyapp.net/api/2/apps/MY_APPLICATION_ID/crashes/upload
回应是
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>id</key>
<string>0</string>
<key>delay</key>
<integer>0</integer>
<key>status</key>
<integer>0</integer>
</dict>
</plist>
创建了状态代码201但是当我在HockeyApp的帐户上打开应用程序的门户时,我发现没有崩溃
我的日志文件格式如下
Package: APPLICATION_PACKAGE_NAME
Version: MY_APPLICATION_VERSION
OS: 2.2
Manufacturer: HTC
Model: HTC Desire
Date: Sun Nov 27 17:35:08 GMT+01:00 2011
CrashReporter Key: 353391450fd2bd05c2753d23848042f3
java.lang.RuntimeException: Unable to start activity ComponentInfo{de.codenauts.hockeyapp/de.codenauts.hockeyapp.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4066)
at android.app.ActivityThread.access$2400(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2140)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:112)
at org.json.JSONTokener.nextValue(JSONTokener.java:90)
at org.json.JSONArray.<init>(JSONArray.java:87)
at org.json.JSONArray.<init>(JSONArray.java:103)
at de.codenauts.hockeyapp.MainActivity.loadApps(MainActivity.java:137)
at de.codenauts.hockeyapp.MainActivity.onCreate(MainActivity.java:66)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
我的配置有什么错误吗? 有没有人将Hockey应用程序与ASP .net MVC集成?
答案 0 :(得分:0)
我已联系过曲棍球支持团队,他们告诉我问题出在日志文件中的这一行
Date: Sun Nov 27 17:35:08 GMT+01:00 2011
如果在相同的时间戳中创建,曲棍球应用程序将拒绝崩溃 所以当我更改日期字段时问题已经解决了