Gcm_defaultSenderId cannot be resolved

I am trying to run a GCMsample application here in my Eclipse.

I do not use Android studio and I do not have a plugin gradlein my eclipse.

After importing the eclipse client application, GCMI get the error message:

gcm_defaultSenderId cannot be resolved or is not a field

I do not want to switch to Android studio.

  • How to remove this error and run the application?

  • If I need to install gradle, which plugin should I use in my Eclipse-MARS?

PS - I have never used gradle before.

+4
source share
2 answers

, :

1.) URL- Google Developer: https://developers.google.com/cloud-messaging/android/start

2.) " " № 2

3.) .

4.) ", ".

5.) "Cloud Messaging" "ENABLE GOOGLE CLOUD MESSAGING".

6.) google-services.json.

7.) "project_number" "project_info".

8.) Eclipse ../res/values/strings.xml . PROJECT_ID , 7.

<string name="gcm_defaultSenderId">PROJECT_ID</string>

9.) , .

+14

Android Studio 3.3.

gradle-wrapper gradle-4.10.1-all.zip

'com.android.tools.build:gradle:3.3.0'

gradle-4.6-all.zip

'com.android.tools.build:gradle:3.2.1'

, .

0

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


All Articles