I am running gcm web server, but it has over gcm version (previous firebase)
so, referenced older project and use that project's gcm dependency.
I saw this issue: GCM unregister causing the application to crash
but it doesn't work for me.
my gradle setting below:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
defaultConfig {
minSdkVersion 17
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation project(path: ':permissionchecker')
implementation project(path: ':datastateview')
implementation 'com.android.support:appcompat-v7:25.1.0'
implementation 'com.android.support:support-vector-drawable:25.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:converter-scalars:+'
implementation 'com.squareup.retrofit2:converter-gson:+'
implementation 'me.relex:circleindicator:1.2.2@aar'
implementation 'com.android.support:design:25+'
implementation 'com.android.support:support-v4:25+'
implementation 'com.android.support:recyclerview-v7:25+'
implementation 'br.com.simplepass:loading-button-android:+'
implementation 'com.googlecode.android-query:android-query:0.25.9'
implementation 'org.altbeacon:android-beacon-library:2.+'
compile 'com.google.android.gms:play-services-gcm:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
and root build.gradle:
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
I tried to many version of, but I met many exception. like
java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com.google.android.gms.iid.zzd' appears in base.apk)
or
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
and any others.