android - WHY? AndroidStudio+Gradle = 46000 method count VS Eclipse+Ant = 43000 method count -
i'm compiling project using proguard google play services 7.5, android 21 , support v4 library. method count higher if compile android studio if compile eclipse. used program called dex-method-count 2 apks generated both programas , discovered reason:
androidstudio+gradle:
support: 5416 v4: 2755 app: 594 content: 33 graphics: 96 drawable: 96 internal: 74 view: 74 media: 123 session: 60 os: 13 text: 17 util: 166 view: 1024 accessibility: 204 widget: 615 v7: 2661 app: 232 appcompat: 1 internal: 1757 app: 77 text: 3 transition: 1 view: 628 menu: 536 widget: 1047 view: 24 widget: 647
eclipse + ant:
support: 2073 v4: 2073 app: 549 content: 21 media: 123 session: 60 os: 11 util: 157 view: 757 accessibility: 204 widget: 455
as can see in first option adding lot of methods support v7, why? how can avoided?
thanks
pd: build gradle files library , application:
apply plugin: 'com.android.library' android { compilesdkversion 'google inc.:google apis:22' buildtoolsversion "22.0.1" defaultconfig { minsdkversion 10 targetsdkversion 10 } buildtypes { release { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-project.txt' } debug { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-project.txt' } } } dependencies { compile 'com.android.support:support-v4:22.2.1' compile 'com.google.android.gms:play-services:7.5.0' compile filetree(dir: 'libs', include: ['*.jar']) }
the application:
apply plugin: 'com.android.application' android { compilesdkversion 'google inc.:google apis:22' buildtoolsversion "22.0.1" defaultconfig { applicationid "com.example.launcher" minsdkversion 10 targetsdkversion 10 } buildtypes { release { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-project.txt' } debug { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-project.txt' } } } dependencies { compile project(':caponatelibrary') compile 'com.google.android.gms:play-services:7.5.0' }
com.google.android.gms:play-services
has dependencies on com.google.android:wearable
, com.google.android:play-services-cast
. each of have dependecies on v7
support libraries (recyclerview-v7
, mediarouter-v7
, respectively).
unless using in play services sdk, better served using finer-grained dependencies (see "selectively compiling apis executable" on this page). not rid of bunch of play services bloat, may rid of v7
methods, depending on bits of play services using.
btw, compilesdkversion 'google inc.:google apis:22'
pointless, unless still using maps v1, rather surprising @ stage. compilesdkversion 22
better choice.
Comments
Post a Comment