在混淆代码之后,我有截断的错误日志:
08-05 14:54:34.587 15299-15299/sn.ok E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: sn.ok, PID: 15299
java.lang.NoSuchMethodError: no static or non-static method "Lcom/portsip/PortSipSdk;.unInitializeSDK()V"
at java.lang.Runtime.nativeLoad(Native Method)如何混淆以下代码:
static {
System.loadLibrary("portsipcore");
}编辑:添加了最后一段代码后,我得到了这个错误
08-17 19:11:36.517 16967-16967/sn.ok E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: sn.ok, PID: 16967
java.lang.NoSuchMethodError: no method with name='receiveSIPEvent' signature='(I)V' in class sn/ok/PortSipSdk;
at sn.ok.PortSipSdk.initializeSDK(Native Method)
at sn.ok.MyApplicationFubu$1.onPostExecute(SourceFile:331)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)发布于 2014-08-07 23:15:57
本机代码正在调用Java代码。ProGuard不(不能)知道这一点,因此必须显式地保留被调用的类、字段和方法不被移除或重命名:
-keep class com.portsip.PortSipSdk {
void unInitializeSDK();
}参见ProGuard手册>示例> 处理回调方法
https://stackoverflow.com/questions/25142243
复制相似问题