2013-08-02 38 views
0

程序崩潰的報告,我使用ACRA送我的應用程序的崩潰報告。我想要使​​用Cloudant的免費託管服務。如何用戶cloudant發送android系統

我已經在雲端名稱「mobile」&上創建了一個數據庫,併爲其寫入權限 using it

我在我的應用程序&構建路徑添加ACRA-4.5 jar文件。

formUriBasicAuthLogin有重點,有formUriBasicAuthLogin密碼。在我的應用

代碼中使用講座

@ReportsCrashes(formKey = "", 
formUri = "https://mshuiet.cloudant.com/mobile/", 

reportType = org.acra.sender.HttpSender.Type.JSON, 

httpMethod = org.acra.sender.HttpSender.Method.PUT, 

formUriBasicAuthLogin="Berndiverewyetheewrillyi", 
formUriBasicAuthPassword="vWqRNHUoc26SodsvtmNTWDcw", 
mode = ReportingInteractionMode.TOAST, 
resToastText = R.string.app_name 
) 

public class Mobile extends Application{ 

@Override 
public void onCreate() { 

    // TODO Auto-generated method stub 
    super.onCreate(); 
    ACRA.init(this); 
} 

} 

我得到異常: -

無法發送崩潰報告1375431176000,approved.stacktrace

+0

是那整個異常消息?似乎悲慘稀疏。 – garbados

回答

0

在Cloudant,證件通過POST創建。 PUT對像這樣的URL正試圖創建一個名爲「移動」的一個新的數據庫,而POST嘗試創建該數據庫中的文檔。檢查databasedocument方法更多的細節我們的文檔。

因此,具體而言,嘗試改變這一行...

httpMethod = org.acra.sender.HttpSender.Method.PUT, 

...這樣的:

httpMethod = org.acra.sender.HttpSender.Method.POST, 
0

此外,CloudAnt數據庫名稱需要通過 'ACRA' 前面在你的情況下,根據這裏的文檔,它將是'acra-mobile'

https://github.com/ACRA/acralyzer/wiki/setup

而且,你的URL路徑應該是這樣的(刪除空格)

的https:// [我的用戶ID。雲彩。 COM/[我的數據庫]/_design/ACRA存儲/ _Update /報告

和HTTP方法應該是這樣的

列舉HTTPMethod = org.acra.sender.HttpSender.Method.POST