Reputation: 47
I have GCMBaseIntentService
error.This issue create when I import project Eclipse to Android Studio
public class GCMIntentService extends GCMBaseIntentService
Here are dependencies I add a lot of dependencies but issue not resolved
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.totalsoft.thearena"
minSdkVersion 9
targetSdkVersion 17
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard- android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.google.code.gson:gson:2.2.1'
compile files('libs/acra.jar')
compile files('libs/commons-httpclient-3.0.1.jar')
compile files('libs/ormlite-android-4.45.jar')
compile files('libs/ormlite-core-4.45.jar')
compile 'com.google.gms:google-services:2.0.0-alpha6'
compile 'com.google.android.gms:play-services-fitness:8.4.0'
compile 'com.google.android.gms:play-services-wearable:8.4.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile files('libs/gcm.jar')
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.maps:google-maps-services:0.1.3'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.android.support:appcompat-v7:19.1.0'
compile 'com.google.android.gms:play-services:4.2.42'
compile 'org.apache.commons:commons-lang3:3.2.+'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:20.+'
}
Upvotes: 0
Views: 182
Reputation: 37798
GCMIntentService
is already deprecated. From this GitHub thread, it will direct you to Android Developer's Blog where it is mentioned:
...the GCMBaseIntentService class has been deprecated. Please use the GoogleCloudMessaging API instead.
If you still want to try and proceed with the implementation that you already have. You can refer to this similar post. It would seem that since the GCMIntentService
has been deprecated, it is no longer included in the Play Services library. From the post:
After lot of google I found that this class is not in google_play_service library but it is in gcm.jar which is deprecated now. I dont know why google has given link to old code and explained latest code in the document.
Where to find a gcm.jar file? That, I'm not sure. Found this answer that might help you though. But seeing that it's been years since it was answered, I suggest you just use the new GoogleCloudMessaging API
.
Cheers! :D
Upvotes: 1