I updated playservice in my sdk and I got this error. And I am not able to access GCM Token. Before update sdk my project work perfectly.
I waste my whole day in i
Please check your declared dependencies. As discussed in the given documentation there are three different types of direct dependencies in the app/ module's build.gradle file.
Sample dependencies are as follows:
android {...}
...
dependencies {
// The 'compile' configuration tells Gradle to add the dependency to the
// compilation classpath and include it in the final package.
// Dependency on the "mylibrary" module from this project
compile project(":mylibrary")
// Remote binary dependency
compile 'com.android.support:appcompat-v7:25.0.1'
// Local binary dependency
compile fileTree(dir: 'libs', include: ['*.jar'])
}
Furthermore, as answered by @Diego Giorgini in a related SO post,
The issue you are experiencing is due to an incompatibility between
play-services / firebase sdk v9.0.0andcom.android.support:appcompat-v7 >= 24(the version released with android-N sdk)
With this, you may want to try the suggested fix:
You should be able to fix it by targeting an earlier version of the support library. Like:
compile 'com.android.support:appcompat-v7:23.4.0'
You may want to also check the other suggestions in the following SO posts: