我已经应用了proguard,在签名和启动应用程序后,我得到了不满意的链接错误。因为我正在使用它的时间无法跟踪问题所在。请查看是否有人可以提供帮助。
日志:
1322-1664/? E/﹕ no predefined limited group find for com.myapp, add to foreground group
03-17 18:17:29.976 9257-9257/? E/dalvikvm﹕ ERROR: couldn't find native method
03-17 18:17:29.976 9257-9257/? E/dalvikvm﹕ Requested: Lcom/portsip/PortSipSdk;.native_setAudioBitrate:(IJII)I
03-17 18:17:29.976 9257-9257/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: unknown failure
at java.lang.Runtime.loadLibrary(Runtime.java:361)
at java.lang.System.loadLibrary(System.java:525)
at com.portsip.PortSipSdk.<clinit>(SourceFile:18)
at com.myapp.myapp_sip.myappSipCore.onCreate(SourceFile:124)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4499)
at android.app.ActivityThread.access$1300(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1323)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5162)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:756)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:572)
at miui.dexspy.DexspyInstaller.main(DexspyInstaller.java:171)
at dalvik.system.NativeStart.main(Native Method)
03-17 18:17:30.036 1322-1664/? E/﹕ no predefined limited group find for com.google.android.gm, add to foreground group
03-17 18:17:32.696 1322-9293/? E/libmc﹕ cgroup add tasks operation start, cancel this limit step down thread.
03-17 18:17:35.246 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:35.246 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:38.266 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:38.266 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:43.766 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:43.766 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:45.406 258-1002/? E/ALSAStreamOps﹕ setParameters(): keyRouting with device2 0x2
03-17 18:17:46.466 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:46.466 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:47.306 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:47.306 297-297/? E/Parcel﹕ Reading a NULL string not supported here.
03-17 18:17:49.866 258-1002/? E/ALSAStreamOps﹕ setParameters(): keyRouting with device2 0x2
03-17 18:17:49.966 1322-1664/? E/﹕ no predefined limited group find for com.myapp, add to foreground group
03-17 18:17:50.216 9378-9378/? E/dalvikvm﹕ ERROR: couldn't find native method
03-17 18:17:50.216 9378-9378/? E/dalvikvm﹕ Requested: Lcom/portsip/PortSipSdk;.native_setAudioBitrate:(IJII)I
03-17 18:17:50.216 9378-9378/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: unknown failure
at java.lang.Runtime.loadLibrary(Runtime.java:361)
at java.lang.System.loadLibrary(System.java:525)
at com.portsip.PortSipSdk.<clinit>(SourceFile:18)
at com.myapp.myapp_sip.myappSipCore.onCreate(SourceFile:124)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4499)
at android.app.ActivityThread.access$1300(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1323)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5162)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:756)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:572)
at miui.dexspy.DexspyInstaller.main(DexspyInstaller.java:171)
at dalvik.system.NativeStart.main(Native Method)
Proguard文件:
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/walkover/Android/Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
-keep class com.facebook.** { *; }
-keepattributes Signature
##---------------Begin: proguard configuration common for all Android apps ----------
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
-dump class_files.txt
-printseeds seeds.txt
-printusage unused.txt
-printmapping mapping.txt
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-allowaccessmodification
-keepattributes *Annotation*
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-repackageclasses ''
-keepdirectories com.myapp
-keep public class * extends android.app.ActionBarActivity
-keep public class * extends android.widget.BaseAdapter
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * implements java.io.Serializable
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclassmembers class * extends com.actionbarsherlock.ActionBarSherlock {
<init>(android.app.Activity, int);
}
-dontnote com.android.vending.licensing.ILicensingService
# Explicitly preserve all serialization members. The Serializable interface
# is only a marker interface, so it wouldn't save them.
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
# Preserve all native method names and the names of their classes.
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
# Preserve static fields of inner classes of R classes that might be accessed
# through introspection.
-keepclassmembers class **.R$* {
public static <fields>;
}
# Preserve the special static methods that are required in all enumeration classes.
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep public class * {
public protected *;
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
##---------------End: proguard configuration common for all Android apps ----------
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { *; }
-keep class com.google.** { *;}
-keep interface com.google.** { *;}
-dontwarn com.google.**
-dontwarn com.thirdpartyapp.**
-dontwarn sun.misc.Unsafe
-dontwarn com.google.common.collect.MinMaxPriorityQueue
-keepattributes *Annotation*,Signature
-keep class * extends com.google.api.client.json.GenericJson {
*;
}
-keep class com.google.api.services.drive.** {
*;
}
##---------------End: proguard configuration for Gson ----------