google cloud messaging - Android Studio doesn't recognize InstanceID class -
i want implement gcm client on android. following guide here https://developers.google.com/cloud-messaging/android/client
have downloaded configuration file , copied google-services.json file app/ directory of project.
i have added dependencies in project's build.gradle
classpath 'com.google.gms:google-services:1.3.0-beta1'
and plugin in app level build.gradle
apply plugin: 'com.google.gms.google-services'
i have included google play services sdk
compile 'com.google.android.gms:play-services:6.+'
i have updated androidmanifest.xml file shown here https://developers.google.com/cloud-messaging/android/client
to registration token, when use following code
instanceid instanceid = instanceid.getinstance(this);
android studio not recognize class. "cannot resolve symbol 'instaceid'". reason why happening?
update play services sdk
compile 'com.google.android.gms:play-services:7.5.0'
then clean project.
worked me. hope works too!
Comments
Post a Comment