에러 메시지
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details

다음 에러가 발생하는 이유는 Proguard라는 것에 문제가 생긴 것이다.

그리고, 위에 노란 느낌표의 주의하는 경고도 여러개 있다.



일단 이 에러의 특징이 디버그시에는 잘되다가 키사인으로 할 경우 안되는데. 일단 배포를 위해서 release모드로 컴파일을 하게 되는데.
이 과정에서 minifyEnabled를 활성화 시킬 경우 소스 난독화와 축약을 하게 된다.

그런데 이를 진행할 시에 문제가 되는 부분인데. 이 경우에는 문제 되는 부분을 제외 시켜야 한다.


Information:Gradle tasks [:app:assembleRelease]
Warning:com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification
Warning:there were 1 unresolved references to library class members.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details
Information:BUILD FAILED
Information:Total time: 3.677 secs
Information:1 error
Information:3 warnings
Information:See complete output in console

에러코드 전문이다.

여기서 뭔가 패키지명 처럼 보이는 부분이 있는가? 이 부분을 등록해주었더니 해결이 되었다.
예외를 등록하는 방법은 현재 프로젝트/app/proguard-rules.pro 파일을 열고, 다음을 추가한다.


-dontwarn com.google.android.gms.common.GooglePlayServicesUtil

빨간색은 본인이 오류에 뜬 패키지명.

다음과 같이 하고나서 컴파일을 해보니 매우 정상적입니다. 해결!