Could not find the gcm.jar error when creating App

2019-07-19 01:31发布

Using the Android Developer Studio, I tried creating an App Engine backend from the menu for an existing Android project:

Tools => Google Cloud Tools => Generate App Engine Backend

The error message was:

Could not find the gcm.jar. Please install the Android SDK Extra : 'Google Cloud Messaging for Android Library' using the Android SDK Manager.

Error Screenshot

From the Android SDK manager that library is marked "Deprecated". So what's the right thing to install / use?

2条回答
ら.Afraid
2楼-- · 2019-07-19 01:56

"Google Play Services" appears to have replaced Google Cloud Messaging and is used instead: http://developer.android.com/google/gcm/gs.html. That said, I installed the deprecated version also to get the app running.

Steps:

  1. Tools => Android => Android SDK Manager
  2. Select "Google Play services" from bottom of list
  3. Install packages...

Ref: http://github.com/phonegap-build/PushPlugin/issues/41

查看更多
迷人小祖宗
3楼-- · 2019-07-19 02:20

In Android Studio version 5.1.2 this was fixed! That said, they still haven't updated the documentation.

查看更多
登录 后发表回答