Android JAR 파일 ProGuard 적용중 The output jar is empty. Did you specify the proper '-keep' options?

ProGuard, version 4.7
Reading program jar [D:\obfuscationjartest\obfuscationjartest.jar]
Reading library jar [D:\adt-bundle-windows-x86_64-20130219\sdk\platforms\android-17\android.jar]
Reading library jar [D:\adt-bundle-windows-x86_64-20130219\sdk\extras\android\support\v4\android-support-v4.jar]
The output jar is empty. Did you specify the proper '-keep' options?

 안드로이드 어플리케이션 APK가 아닌 Library인 JAR파일을 프로가드로 적용하려던 중 그림과 같은 에러가 발생했습니다.

 기본적으로 위 그림과 같이 Shrink를 체크가 되어 있을텐데 체크를 해제해서 기능을 꺼버리거나 직접 pro 파일을 수정하신다면

-dontshrink

 위 옵션을 기입해줍니다. 기능을 활성화를 한다면 역시나 위 그림과 같이 Also keep부분에서 Bean classes만 체크해서 유지시키면 프로가드 적용이 됩니다.

# Also keep - Bean classes. Keep all specified classes, along with their getters
# and setters.
-keep class * {
    void set*(***);
    void set*(int,***);
    boolean is*();
    boolean is*(int);
    *** get*();
    *** get*(int);
}

 프로가드gui를 사용하지 않는다면 위 내용을 추가해 Bean classes만 keep 시킵니다.

댓글

이 블로그의 인기 게시물

'xxx.exe' 프로그램을 시작할 수 없습니다. 지정된 파일을 찾을 수 없습니다.

goorm IDE에서 node.js 프로젝트로 Hello World Simple Server 만들어 띄워보기

애드센스 수익을 웨스턴 유니온으로 수표대신 현금으로 지급 받아보자.