(This is basically the same question as in Android: library project with Retrofit results in NoClassDefFoundError but for play-services-auth
).
I'm trying to build an android library project which uses play-services-auth to access SmartLock for Passwords.
It seems to be working as long as I use api
instead of implementation
on my gradle-dependency for com.google.android.gms:play-services-auth
. It seems that this is the only dependency needing this (all others can used with implementation
).
When using implementation
here as well, the calling app will crash with NoClassDefFoundError
:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/GoogleApiClient$Builder;
I'm using consumerProguardFiles
with a bunch of proguard-rule-files (e.g. one for okhttp3, retrofit2 etc. from this repo). All this will then be packed into an AAR, so rules from the dependencies should be added as well.
It seems that I'm missing a proguard-rule for play-services-auth
. Can somebody post the rules needed to use com.google.android.gms:play-services-auth
in a library project?