2014-10-17 3 views
0

runProguard = true 인 동안 Android 앱에서 내 앱을 내보내고 실제 장치에 APK를 설치하면 앱이 멈추고 다음과 같이 말합니다. 불행히도 [yourapp]가 중지되었습니다.실제 장치 설치시 Proguard와 함께 APK 내보내기가 실패합니다

뭐가 문제입니까? 내 응용 프로그램을 설치하고 완벽하게 실행 Proguard와없이

# Add project specific ProGuard rules here. 
# By default, the flags in this file are appended to flags specified 
# in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt 
# You can edit the include path and order by changing the ProGuard 
# include property in project.properties. 
# 
# 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 *; 
#} 

: i는 기본 상태에서 난독-규칙 .txt 파일을 떠났다.

+0

을 안드로이드에 대한 권장 설정을위한 난독 사이트를 확인하실 수 있습니다 – Elltz

답변

0

당신은 -KeepClassmembers를 사용하여 ... ... 어쩌면 당신이 라이브러리 나 난독 가끔 코드에서 멀리 축소 자바 반사 코드를 사용하고 잘

-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>; 
} 
관련 문제