2

During Android push notification using gcm task, I got these error.Please give suggestions.

I attached the build.gradle details of my application.Give suggestions and help me to solve:

FATAL EXCEPTION: IntentService[]
Process: push.gcm.android.com.pushsample, PID: 7930
java.lang.IncompatibleClassChangeError: 
Methodjava.io.Fileandroid.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context) was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)

build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
    applicationId "push.gcm.android.com.pushsample"
    minSdkVersion 15
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}

 dependencies {
 compile fileTree(include: ['*.jar'], dir: 'libs')
 testCompile 'junit:junit:4.12'
 compile 'com.android.support:appcompat-v7:24.1.1'
 compile 'com.android.support:design:24.1.1'
 compile 'com.google.android.gms:play-services-gcm:8.3.0'
  }
 apply plugin: 'com.google.gms.google-services'

Thanks.

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
Sriram S
  • 533
  • 3
  • 26
  • check [this](http://stackoverflow.com/questions/1980452/what-causes-java-lang-incompatibleclasschangeerror) – Nikhil Aug 26 '16 at 09:52

1 Answers1

1

There are known compatibility issues from Google Play Service with some versions of the android support libraries. Please upgrade your com.google.android.gms:play-services-gcm:8.3.0' to the latest version.

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96