Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build with plugin installed: error: cannot find symbol #13

Open
Peter-Maguire opened this issue Feb 25, 2016 · 13 comments
Open

Cannot build with plugin installed: error: cannot find symbol #13

Peter-Maguire opened this issue Feb 25, 2016 · 13 comments

Comments

@Peter-Maguire
Copy link

:compileReleaseJavaWithJavacX:\prod\platforms\android\src\com\cran  
berrygame\cordova\plugin\game\Game.java:18: error: cannot find symbol
import com.google.android.gms.common.GooglePlayServicesUtil;    
                                    ^
  symbol:   class GooglePlayServicesUtil  
  location: package com.google.android.gms.common  
X:\prod\platforms\android\src\com\google\example\games\basegameuti  
ls\GameHelper.java:34: error: cannot find symbol  
import com.google.android.gms.common.GooglePlayServicesUtil;  
                                    ^  
  symbol:   class GooglePlayServicesUtil  
  location: package com.google.android.gms.common  
X:\prod\platforms\android\src\com\cranberrygame\cordova\plugin\gam  
e\Game.java:76: error: cannot find symbol  
        if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(this.cordova.ge  
tActivity()) != 0) {  
            ^  
  symbol:   variable GooglePlayServicesUtil  
  location: class Game  
X:\prod\platforms\android\src\com\google\example\games\basegameuti  
ls\GameHelper.java:963: error: cannot find symbol  
                errorDialog = GooglePlayServicesUtil.getErrorDialog(errorCode,
                              ^
  symbol:   variable GooglePlayServicesUtil
  location: class GameHelper```
@mobilino
Copy link

Hi,

I have the same problem. I think it is because GooglePlayServicesUtil is deprecated and not included anymore. GoogleApiAvailability is supposed to be used instead. This post explains how:
http://stackoverflow.com/questions/31016722/googleplayservicesutil-vs-googleapiavailability

Could you update the plugin and push it to npm?

/Christof

@pahayah
Copy link

pahayah commented Mar 1, 2016

Got the same problem here.
Would be great to get the fixed updated soon!

Thanks!

@cranberrygame
Copy link
Owner

@UnacceptableUse
@mobilino
@pahayah

Hi

Weired
I have no build error (in cordova cli 5.1.1)

Not sure what is problem.

Thanks
Sang Ki Kwon

@mobilino
Copy link

mobilino commented Mar 5, 2016

Hi cranberrygame,

thanks for looking into this. I guess that we all are building with slightly different settings/environments/tools. Hence I feel that eliminating the deprecated GooglePlayServicesUtil is a sound solution. Above I posted a link that might be a good start.

/Christof

@Peter-Maguire
Copy link
Author

I'd be willing to bet all of the affected are using another plugin that uses google play services, hence the conflict.

@shady786
Copy link

shady786 commented Mar 7, 2016

@UnacceptableUse
@mobilino
@pahayah
@cranberrygame

I experience the same issue when building with this plugin. I doubt it's a conflict since I don't use any other plugin that has a play services dependency. The other plugins I have installed are :
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-dialogs 1.2.0 "Notification"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-game-center 0.4.2 "Game Center"
cordova-plugin-inappbrowser 1.2.1 "InAppBrowser"
cordova-plugin-media 2.1.0 "Media"
cordova-plugin-splashscreen 3.1.0 "Splashscreen"
cordova-plugin-vibration 2.1.0 "Vibration"
cordova-plugin-whitelist 1.2.1 "Whitelist"

Worth noting this was after an update to cordova 6.0.0. Have not reverted back and tried an older version. Some random poking suggests a invalid dependency in the generated gradle file, a checkover is definitely required.

@cranberrygame
Copy link
Owner

@UnacceptableUse
@mobilino
@pahayah
@shady786

Fixed this issue.
Thanks
Sang Ki Kwon

@mobilino
Copy link

mobilino commented Mar 7, 2016

Hi,

could you eliminate the
import com.google.android.gms.common.GooglePlayServicesUtil;
from GameHelper.java too?

/Christof

@cranberrygame
Copy link
Owner

@mobilino

Eliminated GooglePlayServicesUtil from GameHelper.java

Thanks
Sang Ki Kwon

@mobilino
Copy link

mobilino commented Mar 8, 2016

Thanks, Sang!!

@hanrock
Copy link

hanrock commented Apr 11, 2016

I'm getting this error! but with GoogleApiAvailability!

error

PS: this error shows up when i try to run with admobpro plugin!

Any suggestions?

@cwmahan
Copy link

cwmahan commented May 11, 2016

+1 on the GoogleApiAvailability build issue. Any updates?

@cleverocheck
Copy link

+1 on build issue. I came to this plugin from https://github.com/artberri/cordova-plugin-play-games-services, since the input-output-input-output chain does not work there (after it stops entering), and here is the problem with starting the software In fact, with a clean cordova project of a stable version at the time of writing the comment, I tried other plugins for Google Play, but they are either not completed at all (either the logout is not done in principle, just the TODO in the code weighs on this, then something else is not completed yet). In general, writing games using cordova is not an easy task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants