본문 바로가기

AOS - Java

[안드로이드/Android] Generate signed APK Error / apk 추출 error

반응형
SMALL

Android apk 추출 에러


build > Generate signed APK > 새로운 키를 생성 하면 실패 되었다는 메시지와 함께 나오는 문구



……….     there were duplicate class definitions      ……..


Butterknife org.apache.poi.* rx.internal.* 라이브러리 안에 있는 모든것이 can’t find 라는 오류와 함께 밑에 


Warning: there were 1341 unresolved references to classes or interfaces.

         You may need to add missing library jars or update their versions.

         If your code works fine without the missing classes, you can suppress

         the warnings with '-dontwarn' options. 

…..



이런 에러 문구가 나올 경우




[ pro guard-rules.pro ]


Butterknife 라이브러리일 경우

-keep class butterknife.** { *; }

-dontwarn butterknife.internal.**

-keep class **$$ViewBinder { *; }


-keepclasseswithmembernames class * {

  @butterknife.* <fields>;

}


-keepclasseswithmembernames class * {

   @butterknife.* <methods>;

}


org.apache.poi.* 경우

-dontwarn org.apache.poi.**


rx.internal.*. 경우

-dontwarn rx.internal.**



추가한



App/build.gradle  


android {

    signingConfigs {

        release {

            storeFile file("/android_key.jks") 

            storePassword “password”

            keyAlias "android_key"

            keyPassword “password”

        }

    }


…….


}



추가한다.



반응형
LIST