Unable to import import com.google.android.gcm.GCMBaseIntentService

Guys, I have a huge problem here. I have a project that uses gcm, but import cannot be allowed. I tried all the other offers on this site and others, but nothing works. please help. I downloaded the library, copied the jar to the / libs folder and added it to create the path

but i still got import error

what could be the problem?

+1
source share
3 answers

first remove google play services from eclipse and clean up the project

For Google Play services, first install the Google Play services.

SDK Manager → Advanced → Google Play Services

after installation go to

File-> import-> SDK folder path → additional → additional / google / google _play_services / libproject / google-play-services_lib

Make sure gcm.jar exists on your adt

/ Users / SS / Desktop / Android / stand-bundle-mac-x86_64-20130717 / SDK / additional / Google / GSM / GSM client / distance

+4
source

http://developer.android.com/google/gcm/client.html

The key point is that you must reference the library. Simply adding a .jar file to an Eclipse project will not work. You must follow the directions for linking to the library, or your application will not be able to access library resources and it will not work properly. If you are using Android Studio, this is the line you need to add to the dependency section of your build.gradle assembly file:

dependencies {compilation: "com.google.android.gms: play-services: 3.1. +"}

+2
source

Add GCM.jar to your project from the property.

0
source

Source: https://habr.com/ru/post/957167/


All Articles