내 안드로이드 앱에서 jacorb.jar 및 CORBA 인터페이스를 사용하지 않으므로 넘어졌습니다. 내가 Proguard와를 사용하여 코드를 당황하게하려고 할 때 나는이 같은 경고를 많이 얻을 :CORBA로 Android 앱을 난독 화합니다.
[proguard] Warning: there were 1223 unresolved references to classes or interfaces.
[proguard] You may need to specify additional library jars (using '-libraryjars'),
[proguard] or perhaps the '-dontskipnonpubliclibraryclasses' option.
[proguard] Warning: there were 33 unresolved references to program class member
s.
[proguard] Your input classes appear to be inconsistent.
[proguard] You may need to recompile them and try again.
[proguard] Alternatively, you may have to specify the options
[proguard] '-dontskipnonpubliclibraryclasses' and/or
[proguard] '-dontskipnonpubliclibraryclassmembers'.
내 proguard.cfg :
-injars bin/classes
-outjars bin/classes-processed.jar
-libraryjars C:/android-sdk-windows/platforms/android-7/android.jar
-libraryjars libs
-dontpreverify
-repackageclasses ''
-allowaccessmodification
-optimizations !code/simplification/arithmetic
-keepattributes *Annotation*
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontnote
-keep class com.android.vending.billing.**
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-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.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * implements android.os.Parcelable {
static android.os.Parcelable$Creator CREATOR;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
어떻게
[proguard] Warning: org.jacorb.orb.standardInterceptors.SASComponentInterceptor: can't find referenced
class org.ietf.jgss.Oid
을 그리고 결과 이러한 경고를 수정하고 apk 파일을 작성 하시겠습니까?
내 앱에서 실제로 사용하지 않는 모든 클래스에 -dontwarn 옵션을 추가했습니다. 그러나 또 다른 종류의 경고가 여전히 존재합니다 : '[proguard] 경고 : org.jacorb.imr.util.AddServerWindow : org.jacorb.imr.util.AddServerWindow 클래스의 참조 된 메소드 'void pack()'을 찾을 수 없습니다. ' 이 클래스는 libs/jacorb.jar에 보관됩니다. '-keepclasseswithmembers class org.jacorb. ** ' 을 사용하지만 효과가 없습니다. – Ola
Cfr. ProGuard 설명서> 문제 해결> 경고 : 참조 된 필드/메소드를 찾을 수 없습니다. (ProGuard의 이전 버전에서) dontskipnonpubliclibraryclasses와 dontskipnonpubliclibraryclass 멤버를 시도 했습니까? –
이 옵션을 별도로 사용하거나 함께 사용하려고했습니다 (질문에 대해 썼습니다). 방금 ('-ignorewarnings' -dontshrink' -dontoptimize' 옵션으로) 이러한 경고를 무시하면 앱 서비스를 시작할 수 없습니다. – Ola