기본 Android 애플리케이션에 MobileFirst 7 라이브러리를 사용하고 있지만 심각하게 발견되었습니다.은 Android 애플리케이션의 dex 메소드 수를 늘립니다 (65,536 limit 위로 밀기). Adding the IBM MobileFirst Platform Foundation SDK to a new or existing application with Android Studio 기사 당IBM MobileFirst 7 의존성
, 나는 내 build.gradle
에 다음과 같은 추가 :
compile group: 'com.ibm.mobile.foundation',
name: 'ibmmobilefirstplatformfoundation',
version: '7.1.0.0',
ext: 'aar',
transitive: true
따르면 methodscount.com하려면 MobileFirst 라이브러리 (및 그 종속의)는 (무려 39,364 방법에서 사용 가능한 덱스 방법 수의 60 %를 가져옵니다)!
나는 Proguard와는 MobileFirst 사용의 영향을 줄일 도움이 될 생각하지만, 예를 proguard-project.txt가 다음 지시문이 발견 : 내가 알고있는 것처럼,이 효과적으로 Proguard와 지시-keep class com.google.** { *;}
Google Guava 중 하나를 제거하지 행동 양식. MobileFirst가 가져 오는 다른 라이브러리가 있지만 최대 크기이기 때문에 구아바로 시작했습니다.
$ unzip ibmmobilefirstplatformfoundation-7.1.0.aar
$ jadx --output-dir temp/ classes.jar
$ grep -roh . -e 'com.google.common.*' | sort | uniq
(디 컴파일러는 참조의 일부를 누락 될 수 있습니다 부여)하지만를 구아바 라이브러리의 제로 참조를 발견
은 그 때 나는 많은 MobileFirst는 구아바 라이브러리를 활용하는 방법을 조사하기로 결정 구아바 의존성이 배제 될 수있는 것처럼 보입니까?
compile(group: 'com.ibm.mobile.foundation',
name: 'ibmmobilefirstplatformfoundation',
version: '7.1.0.0',
ext: 'aar',
transitive: true) {
exclude group: 'com.google.guava', module: 'guava'
}
그 (그리고 문제가 될 것 구아바 제외) 다음의 경우가 아닌 경우 :
- 만 MobileFirst에 필요한 방법을 유지하는 데 사용할 수있는 더 나은 Proguard와 규칙이있다 의존성?
- MobileFirst가 의존하는 다른 대형 라이브러리도 제외 할 수 있습니까?
을 감사! 그건 도움이 톤! org.bouncycastle. * 중 하나라도 제외 될 수 있습니다 (다음 큰 종속성이므로). 나는 MobileFirst가 가지고있는 "org.bouncycastle : bcprov-jdk15on : 1.48"의존성 아래에 있다고 생각합니까? – Travis