firebase - Cannot find com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable class -


my build.gradle is:

// facebook account kit compile 'com.facebook.android:account-kit-sdk:4.+'  // google firebase database compile 'com.google.firebase:firebase-database:9.6.0'  // google firebase cloud messaging compile 'com.google.firebase:firebase-messaging:9.6.0' 

after rebuild project,a error happens.

error:(74, 27) error: cannot access abstractsafeparcelable cannot find com.google.android.gms.common.internal.safeparcel.abstractsafeparcelable class

==============================================

resolution:

the reason after rebuilding project, gradle download latest version of "account-kit-sdk" 4.25.0, new version changes gms, make conflicts firebase messaging,

so downgrade account-kit-sdk version, change import version "account-kit-sdk:4.+" "account-kit-sdk:4.24.0"

then issue has been resolved.

but think not best resolution problem.

welcome friends add new ways resolve issue.

thanks.

version 4.25.0 of com.facebook.android:account-kit-sdk has dependency on com.google.android.gms:play-services-auth-api-phone:11.0.1 not present in version 4.24.0. com.google.android.gms:play-services-auth-api-phone adds many transitive dependencies on other com.google.android.gms modules, including base, basement, tasks, auth, , auth-base.

the firebase libraries have transitive dependencies on numerous com.google.android.gms modules. if version numbers of of firebase , play services modules in build not same, problems such 1 occur.

a simple solution use version 11.0.1 of firebase , play services libraries list in gradle dependencies:

// google firebase database compile 'com.google.firebase:firebase-database:11.0.1'  // google firebase cloud messaging compile 'com.google.firebase:firebase-messaging:11.0.1' 

you should specify fixed version number facebook library make build predictable , repeatable:

compile 'com.facebook.android:account-kit-sdk:4.25.0' 

the risk of specifying version "4.+" when new version released has transitive dependencies on new version of play services libraries, new facebook lib version automatically used , build break again.

to debug problems one, can open gradle window in android studio , double-click on :app -> tasks -> android -> androiddependencies generate dependency tree. tree can examined find version mismatches.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -