我在我的应用程序中使用Google ACRA。
最近我收到以下错误发送到我的报告文件:
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)
仅在运行Android 2.3.7的Nexus S上发生此错误。 我不知道它是否总是相同的设备。
显然,错误不是来自应用程序本身,而是来自Google报告。
有没有人知道如何解决它?
答案 0 :(得分: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);
}
希望有帮助...
答案 1 :(得分:0)
您确定Nexus是否需要所有库?您确定库的版本与其他手机或模拟器中的版本相同吗?