1

I want to use google gcm in my app, but I meet the java.lang.IncompatibleClassChangeError when call XXXFragment.class, and this problem just happens on android 5.0+(My samsung note3 with cm12-android 5.1). It does not happen in my another phone with android 4.4.4 and an emulator with android 4.4.4. The answer in this question point that the version of support v4 is higher than 24 may cause this problem, but this doesn't exist in my project.

Below is the dependencies in build.gradle:

compile ('com.google.android.gms:play-services-gcm:9.0.2') { exclude module: 'support-v4' exclude module: 'support-annotations' }

So why this happens?

Update This problem does not happens on samsung s6 with android 5.1.1 as well.

Community
  • 1
  • 1
wqycsu
  • 290
  • 2
  • 16
  • What version of google services are you using? – ReyAnthonyRenacia Jul 01 '16 at 06:17
  • @noogui It's the classpath dependencies (`classpath 'com.google.gms:google-services:3.0.0'`) in the `build.gradle` file of my project – wqycsu Jul 01 '16 at 06:30
  • What happens if you change to google-services:2.1.2 ? – ReyAnthonyRenacia Jul 01 '16 at 06:31
  • @noogui Thanks, but it not works for me. The app still crash but with another problem `Caused by: android.content.res.Resources$NotFoundException: File from drawable resource ID #0x7f0a0011`. This id exists in play-service-base, it is belong to a value named `icon_only`. – wqycsu Jul 01 '16 at 07:56

0 Answers0