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”
}
}
…….
}
를 추가한다.