【发布时间】:2017-01-09 00:19:46
【问题描述】:
根据methods.complay-service-base一共有15k个方法。但是,我已经在我的build.gradle 中包含了 Android support-v4(~9k 方法)。无论如何要确保我的应用程序中的总方法计数是 15k 而不是 24k = 15k + 9k?
我的 build.grade:
...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'
androidTestCompile('com.android.support.test:runner:0.5') {}
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') {
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
exclude module: 'support-annotations'
}
androidTestCompile 'com.android.support:support-annotations:23.4.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.1@aar') {
transitive = true;
}
compile('com.android.support:appcompat-v7:23.4.0') {
force true
}
compile('com.android.support:support-v4:23.4.0') {
force = true;
}
compile('com.android.support:recyclerview-v7:23.4.0') {
force = true;
}
compile('com.android.support:cardview-v7:23.4.0') {
force = true;
}
compile('com.android.support:design:23.4.0') {
force = true;
}
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile 'com.android.support:percent:23.4.0'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.google.android.gms:play-services-base:9.2.0'
compile 'com.google.android.gms:play-services-location:9.2.0'
...
}
...
【问题讨论】:
-
从 android studio beta 分析 apk 函数中检查实际方法数。
标签: android gradle google-play-services android-support-library dex