Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

I added the plugin and i got this error while build #424

Closed
baltejsingh88 opened this issue Dec 15, 2015 · 40 comments
Closed

I added the plugin and i got this error while build #424

baltejsingh88 opened this issue Dec 15, 2015 · 40 comments
Labels

Comments

@baltejsingh88
Copy link

screen shot 2015-12-15 at 11 15 36 am

@macdonst
Copy link
Member

@baltejsingh88
Copy link
Author

Hi mac.. i already have these Updated!

@baltejsingh88
Copy link
Author

screen shot 2015-12-15 at 11 27 35 am

have a look at this!

@baltejsingh88
Copy link
Author

I see something now.. Play Services are not Installed.. Let me install it!

@baltejsingh88
Copy link
Author

its still giving me the same error!

@baltejsingh88
Copy link
Author

screen shot 2015-12-15 at 11 35 55 am
What wrong am i going Sir?

@baltejsingh88
Copy link
Author

I am just searching for a plugin that will let me read the Notifications, I am using Parse notifications, Device Registrations etc is done already.. and getting Pushes too.. what i am left is just to read the Push Notifications Payload Data that is recieved from the Parse.com

@baltejsingh88
Copy link
Author

Can you suggest me something on that!

@baltejsingh88
Copy link
Author

I am using Ionic Framework too

@baltejsingh88
Copy link
Author

After removing this plugin it builds fine.. !!

@fredgalvao
Copy link
Collaborator

Seems like you either have a rogue plugin installed alongside, or you have some weird bad plugin installation, for I can see you have other uncommon warnings about duplicate permissions on your AndroidManifest.xml related to push notification receipt.

Is it possible you could reinstall the plugin or the android platform?

@macdonst
Copy link
Member

@codecrab-studios your build environment can't find GoogleCloudMessaging.INSTANCE_ID_SCOPE which means generally means your Android environment is not setup correctly. You should make sure when this plugin gets added to your project that the build.gradle file includes the Google Play package for GCM.

@shprink
Copy link

shprink commented Dec 16, 2015

I have the same problem, my Android env is setup correctly. I removed the old push plugin and install this one instead. It is not working anymore.

/Users/shprink/Sites/WPHC/wordpress-hybrid-client/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java:30: error: cannot find symbol
                    GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);

@shprink
Copy link

shprink commented Dec 16, 2015

Here is my settings:

  • Android Support Library version 23.1.1
  • Android Support Repository version 25
  • Google Play Services version 28
  • Google Repository version 23

@shprink
Copy link

shprink commented Dec 16, 2015

I had to rollback to v1.2.3 to make it work.

@macdonst
Copy link
Member

Try removing your platforms directory and re-adding Android to your project.

@shprink
Copy link

shprink commented Dec 16, 2015

I remove everything everytime, it does not change the fact that > 1.2.3 I have the error

@shprink
Copy link

shprink commented Dec 16, 2015

If it can help you the project is open source I could create a branch for you to try

@macdonst
Copy link
Member

@shprink you can send me the link but I suspect it won't matter as my build can find that GCM library. I'm pretty sure it is an issue with your environment but add a link here and I will try it.

@shprink
Copy link

shprink commented Dec 16, 2015

If it is not related to these settings:

Android Support Library version 23.1.1
Android Support Repository version 25
Google Play Services version 28
Google Repository version 23

What are we missing then?

@macdonst
Copy link
Member

@shprink It's 100% related to Google Play Services version 28 & Google Repository version 23. When you build the app it can't find Google Play Services (or the correct version) for some reason. Make sure your $ANDROID_HOME environment variable is set to what you expect it to be.

@shprink
Copy link

shprink commented Dec 16, 2015

I am making dozens of apps a year, do not worry $ANDROID_HOME is fine :P

@nicoabie
Copy link

I had the same error. But in my case it was caused by a short memory of vagrant's VM. I don't know if you are using it @codecrab-studios or @shprink

@shprink
Copy link

shprink commented Dec 16, 2015

Nope, I am on OSX

@gabrielbazan7
Copy link

I have the same issue. Any idea? I am on OSX.

@shprink
Copy link

shprink commented Dec 17, 2015

Using 1.2.3 till we get the solution

@macdonst
Copy link
Member

All, I have two OSX device and I cannot reproduce the error on either so I'm not sure what I can do in this case. My only recommendation at this point is to delete your platforms and plugins directories and re-add the platform and plugins. If anyone comes up with a solution please document it in this issue and I'll add it to the docs.

@shprink
Copy link

shprink commented Dec 18, 2015

delete your platforms and plugins directories and re-add the platform and plugins

I have done that several times, nothing changed. This is definetly a problem with our machine configuration, nothing to do with this plugin. Thanks for your time @macdonst :)

@macdonst
Copy link
Member

@shprink when you figure it out please let me know.

@mapeveri
Copy link

mapeveri commented Jan 7, 2016

Is there a solution to this issue?. I have same problema.

Thanks!

@gabrielbazan7
Copy link

I am using 1.2.3 : cordova plugin add phonegap-plugin-push@1.2.3 . It works perfectly for me, however i still have that issue with recent versions.

@mapeveri
Copy link

mapeveri commented Jan 7, 2016

@gabrielbazan7 I have find solution for build correctly.

In my case

  1. Remove plugin google+
  2. Remove plugin facebook.
  3. Remove plugin google-play-services if this exists.

After, add plugin facebook, but jeduan fork, add plugin google+ and finally execute ionic build android.

This works, but not found google+ plugin because there is google-play-services. If added google-plat-services plugin, display error: https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#multidex

Any idea?.

Sorry for my English :)

Thanks!

@baltejsingh88
Copy link
Author

I did event used v1.2.3, but still its not working..
Please help!

screen shot 2016-01-15 at 11 16 14 pm

@macdonst
Copy link
Member

@codecrab-studios you are using two plugins that both include the same jar. You are better off using the latest code and fixing the issue where your environment can't find the GoogleCloudMessaging library.

@baltejsingh88
Copy link
Author

I just did some tests:
I have two plugins :

  1. phonegap-plugin-push
  2. phonegap-facebook-plugin

Test 1: I removed both plugins and the build was fine
Test 2: Added "phonegap-facebook-plugin" again and got the Build Error
Test 3: Removed "phonegap-facebook-plugin" and added "phonegap-plugin-push" and Build was fine.

What should i do now, I need to have Facebook login plugin for sure!

@macdonst
Copy link
Member

@codecrab-studios are you using the recommend plugin as per the docs?

https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#co-existing-with-facebook-plugin

@baltejsingh88
Copy link
Author

yes i do!

@baltejsingh88
Copy link
Author

but i think i removed it earlier ! and just used phonegap-facebook-plugin

@baltejsingh88
Copy link
Author

i think i got you now..what you saying..

https://github.com/Wizcorp/phonegap-facebook-plugin - this is the plugin i did add earlier

and i think i need to install recommended plugin

and I did it... the Build is great now

Thanks!

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

7 participants