2015-09-04 39 views
2

啓用ProGuard的有,在啓用的build.gradle爲proguard的Linphone會Android的一個很好的環境,我試試這個代碼proguard-rules.pro:Proguard的規則Linphone中的Android在的build.gradle

-keep public class * extends * 
-keep public class * implements LinphoneCoreListener 
-keep interface * { *; } 

但JNI錯誤被發現:

JNI檢測到的錯誤應用:JNI的GetMethodID調用掛起 例外 'java.lang.NoSuchMethodError' 扔在長 org.linphone.core.LinphoneCoreImpl.newLinphoneCore(org.linphone.core .LinphoneCoreListener, java.lang.String,java.lang.String,java.lang.Object): - 2

是否有人,誰有一個良好的設置linphone proguard?

回答

4

請下面的代碼添加到您的ProGuard-android.txt文件

#linphone 
-keep class org.linphone.** { *; } 
-keepattributes Signature 

希望這將有助於!