먼저이 주제에 대한 답변을 얻었지만 찾지 못했습니다 ...Android 및 Google API 클라이언트가있는 Proguard
저는 Android 및 Proguard에서 새로 생겼습니다. 내 appication 개발이 끝날 때, 나는 물론 proguard를 사용하여 그 크기를 줄이기를 원합니다. 내 애플리케이션에서 Google API 클라이언트의 일부 라이브러리를 사용할 때이를 외부 jar로 추가했습니다.
글쎄, 내 애플 리케이션 proguard 단계를 통과하지 않고 확인 작업이지만, 그것을 내보낼 때 내 두통을 시작합니다. 내가 건너 뛰거나 준비하는 방법을 모르겠다는 많은 경고. 이 무엇인가 :
[2012-03-05 07:20:06 - CollaJoveThreads] Proguard returned with error code 1. See console
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
및 더 비슷합니다.
나는 구글 개발자의 recomendations을 따라 내 proguard.cfg이 줄을 추가 한 :
# Needed by google-api-client to keep generic types and @Key annotations accessed via reflection
-keepclassmembers class * {
@com.google.api.client.util.Key <fields>;
}
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault,*Annotation*
-dontwarn sun.misc.Unsafe
하지만이 모든 경고 메시지를 표시하고 있습니다. 그리고 '-dontwarn'옵션을 사용하려고하면 내 앱이 다운됩니다.
나는이 질문을 읽고, 그리고 더 많은 :
사람이 도와 드릴까요?
죄송합니다. 발견 : 'jsr305-1.3.9'jar 파일이 누락되었습니다 (이전에 깨닫지 못했습니다). 모두에게 감사드립니다. – emiquelgavalda