2
gcmタスクを使用してAndroidのプッシュ通知中に、私はこれらのエラーを持っています。どのようにjava.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDirを解決する
私は私のapplication.Giveの提案のbuild.gradleの詳細を添付し、解決するために私を助ける:
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'
感謝を。
チェック[this](http://stackoverflow.com/questions/1980452/what-causes-java-lang-incompatibleclasschangeerror) – Nikhil