Status Update
Comments
tn...@google.com <tn...@google.com>
je...@google.com <je...@google.com>
je...@google.com <je...@google.com>
is...@google.com <is...@google.com>
hu...@google.com <hu...@google.com>
je...@google.com <je...@google.com>
hm...@google.com <hm...@google.com>
hm...@google.com <hm...@google.com> #2
I can reproduce this (thanks for the repro project!)
It looks like the problem is that the desugared api list from r8 contains this entry:
java/util/Collection#removeIf(Ljava/util/function/Predicate;)Z
but the bytecode here doesn't match -- it's java/util/ArrayList. Collection isn't a directly implemented interface or a direct super class, it's an interface on the super super class. The most efficient thing runtime wise would be for the signature list to inline this method on all implemented subclasses. But I should probably at least for now go and make the desugared API lookup do something similar to what it does for API lookup -- search through all super classes and interfaces as well. This isn't a new problem, so I'm very surprised this hasn't come up before (or it has, and I've forgotten).
an...@google.com <an...@google.com> #3
(I have a pending CL that was working to improve the handling of fields now that r8 handles desugaring fields, I'll try to dust that off and combine the fix in there.)
Description
supply all required information.
Build tools: 22.0.1
Gradle project has a marker named `tools:overrideLibrary`. This marker should support asterisk, for example:
tools:overrideLibrary="com.google.android.gms.*"
=== MY ISSUE ===
My app uses minimum SDK 7, and uses library Google Play Services, which requires API 9+:
compile 'com.google.android.gms:play-services:7.3.0'
For all components from the library Google Play Services, the app just wants to use AdMob only, and only if available (for API >= 9). If the user is running API < 9, the app simply doesn't show ads.
To do that, I have to use `tools:overrideLibrary` like this:
<uses-sdk tools:overrideLibrary="com.google.android.gms.all,com.google.android.gms.ads,com.google.android.gms,com.google.android.gms.analytics,com.google.android.gms.appindexing,com.google.android.gms.appinvite,com.google.android.gms.appstate,com.google.android.gms.cast,com.google.android.gms.drive,com.google.android.gms.fitness,com.google.android.gms.location,com.google.android.gms.maps,com.google.android.gms.games,com.google.android.gms.gcm,com.google.android.gms.identity,com.google.android.gms.nearby,com.google.android.gms.panorama,com.google.android.gms.plus,com.google.android.gms.safetynet,com.google.android.gms.wallet,com.google.android.gms.wearable" />
This is ridiculous.
Please add support for asterisk. So instead of above thing, it should be simpler like this:
tools:overrideLibrary="com.google.android.gms.*"
===
Another question: is it wrong that I have to include this library:
compile 'com.google.android.gms:play-services:7.3.0'
then I can't just use this?
tools:overrideLibrary="com.google.android.gms"
It doesn't work at this moment.
Thanks.