2012-01-08 56 views
2

我在我的應用程序中使用Google ACRA。使用Google ACRA時的java.lang.NoSuchMethodError

最近我獲取發送到我的報告文件中出現以下錯誤:

java.lang.NoSuchMethodError: 
    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.<init>(OpenSSLSocketImpl.java:213) 
    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImplWrapper.<init>(OpenSSLSocketImplWrapper.java:35) 
    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketFactoryImpl.createSocket(OpenSSLSocketFactoryImpl.java:92) 
    at org.acra.util.FakeSocketFactory.createSocket(FakeSocketFactory.java:79) 
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164) 
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) 
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119) 
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359) 
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) 
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487) 
    at org.acra.util.HttpRequest.sendPost(HttpRequest.java:109) 
    at org.acra.util.HttpRequest.sendPost(HttpRequest.java:80) 
    at org.acra.util.HttpUtils.doPost(HttpUtils.java:59) 
    at org.acra.sender.GoogleFormSender.send(GoogleFormSender.java:62) 
    at org.acra.ErrorReporter.sendCrashReport(ErrorReporter.java:850) 
    at org.acra.ErrorReporter.checkAndSendReports(ErrorReporter.java:960) 
    at org.acra.ErrorReporter$ReportsSenderWorker.run(ErrorReporter.java:142) 

出現該錯誤只在歌Nexus S運行Android 2.3.7。 我不知道它是否總是相同的設備。

顯然,錯誤不是來自應用程序本身,而是來自Google報告。

有沒有人有一個想法,我該如何解決它?

+0

你使用ProGuard的呢? – Force 2012-01-08 09:58:22

+0

我沒有使用ProGuard – 2012-01-09 15:16:33

回答

0

你確定你的Nexus有所有需要的庫嗎?你確定這些庫的版本與其他手機或模擬器相同嗎?

+0

不,我不是。我在Google報告中看到這個錯誤,我沒有訪問實際的設備。我的應用程序在市場上銷售,所以我知道有成百上千的人使用它,但錯誤僅來自Nexus S,我不確定它是一個設備還是不同的Nexus S設備。 – 2012-01-08 15:44:08

1

你困惑嗎?..我有類似的問題,但可以解決它們。

如果是這樣,嘗試添加這些行到你的proguard.cfg:

#ACRA specifics 
# we need line numbers in our stack traces otherwise they are pretty useless 
-renamesourcefileattribute SourceFile 
-keepattributes SourceFile,LineNumberTable 

# ACRA needs "annotations" so add this... 
-keepattributes *Annotation* 

# keep this class so that logging will show 'ACRA' and not a obfuscated name like 'a'. 
# Note: if you are removing log messages elsewhere in this file then this isn't necessary 
-keep class org.acra.ACRA { 
     *; 
} 

# keep this around for some enums that ACRA needs 
-keep class org.acra.ReportingInteractionMode { 
    *; 
} 

# keep this otherwise it is removed by ProGuard 
-keep public class org.acra.ErrorReporter 
{ 
public void addCustomData(java.lang.String,java.lang.String); 
} 

# keep this otherwise it is removed by ProGuard 
-keep public class org.acra.ErrorReporter 
{ 
public org.acra.ErrorReporter$ReportsSenderWorker handleSilentException(java.lang.Throwable); 
} 

希望幫助...

相關問題