• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Build FAILED since latest GMS2 release in android [SOLVED]

Hiya guys,

I have been trying to build my game for android but having some issues since the latest release. I have tried several SDK versions, 24, 28 and 29 but I get the same issues. I have also updated my java JDK 8 as per this guide - https://help.yoyogames.com/hc/en-us/articles/227860547-GMS2-Required-SDKs

Not sure if anyone has experience a similar issue and might know a solution?

Here is my build error -

Code:
import com.google.android.gms.gcm.GoogleCloudMessaging;
                                 ^
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GcmPush.java:15: error: package com.google.android.gms.gcm does not exist
import com.google.android.gms.gcm.GoogleCloudMessaging;
                                 ^
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GcmPush.java:62: error: cannot find symbol
private GoogleCloudMessaging mGcm;
       ^
  symbol:   class GoogleCloudMessaging
  location: class GcmPush
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GcmIntentService.java:57: error: cannot find symbol
        GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
        ^
  symbol:   class GoogleCloudMessaging
  location: class GcmIntentService
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GcmIntentService.java:57: error: cannot find symbol
        GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
                                   ^
  symbol:   variable GoogleCloudMessaging
  location: class GcmIntentService
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GcmIntentService.java:73: error: package GoogleCloudMessaging does not exist
            if (GoogleCloudMessaging.MESSAGE_TYPE_SEND_ERROR.equals(messageType)) {
                                    ^
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GcmIntentService.java:76: error: package GoogleCloudMessaging does not exist
            } else if (GoogleCloudMessaging.MESSAGE_TYPE_DELETED.equals(messageType)) {
                                           ^
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GcmIntentService.java:80: error: package GoogleCloudMessaging does not exist
            } else if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals(messageType)) {
                                           ^
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GcmIntentService.java:141: error: cannot find symbol
                GooglePlayServicesExtension.QueuePushNotification(json, GcmPush.PUSH_EVENT_REMOTE, true );
                                          ^
  symbol:   method QueuePushNotification(String,int,boolean)
  location: class GooglePlayServicesExtension
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GcmPush.java:82: error: cannot find symbol
           mGcm = GoogleCloudMessaging.getInstance(mContext);
                  ^
  symbol:   variable GoogleCloudMessaging
  location: class GcmPush
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GooglePlayServicesExtension.java:546: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
RunnerJNILib.CloudResultData(s.getBytes(), 0 /*STATUS_NEW_GAME_DATA*/, fileId);
           ^
  required: byte[],byte[],int,int
  found: byte[],int,int
  reason: actual and formal argument lists differ in length
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GooglePlayServicesExtension.java:560: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
RunnerJNILib.CloudResultData( null, 0 /*STATUS_NEW_GAME_DATA*/, fileId );
           ^
  required: byte[],byte[],int,int
  found: <null>,int,int
  reason: actual and formal argument lists differ in length
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GooglePlayServicesExtension.java:681: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
RunnerJNILib.CloudResultData(s.getBytes(), 0 /*STATUS_NEW_GAME_DATA*/, fileId);
           ^
  required: byte[],byte[],int,int
  found: byte[],int,int
  reason: actual and formal argument lists differ in length
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GooglePlayServicesExtension.java:700: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
RunnerJNILib.CloudResultData( null, 0 /*STATUS_NEW_GAME_DATA*/, fileId );
           ^
  required: byte[],byte[],int,int
  found: <null>,int,int
  reason: actual and formal argument lists differ in length
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\PushLocalAlarmReceiver.java:40: error: cannot find symbol
        GooglePlayServicesExtension.QueuePushNotification(msgData, GcmPush.PUSH_EVENT_LOCAL, true );
                                  ^
  symbol:   method QueuePushNotification(String,int,boolean)
  location: class GooglePlayServicesExtension
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
15 errors
:com.dynamiczero.survivingtitan:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':com.dynamiczero.survivingtitan:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED

Total time: 13.8 secs
Picked up _JAVA_OPTIONS: -Xmx4096M


C:\WINDOWS\system32\cmd.exe DONE (1)
C:\WINDOWS\system32\subst.exe /d W:


C:\WINDOWS\system32\subst.exe DONE (0)
Error : Build Failed
Igor complete.
Many thanks!
 

pipebkOT

Member
@dynamic_zero
this is an extension problem.

make sure to have the lastest IDE AND RUNTIME, and the google play extension 3.1.2 ,and remember to always clean the cache of the project after installing or deleting and extension
 
Last edited:

Elevory

Member
I'm having the exact same problem with the Google Play Services extension v3.1.2 (released today), as well as latest IDE and runtime. Anyone figure out a solution for this yet?

Thanks!

EDIT: After grabbing some SDK+Gradle updates from Android Studio, this issue appears to be resolved!
 
Last edited:
K

krugen

Guest
I'm having the exact same problem with the Google Play Services extension v3.1.2 (released today), as well as latest IDE and runtime. Anyone figure out a solution for this yet?

Thanks!

EDIT: After grabbing some SDK+Gradle updates from Android Studio, this issue appears to be resolved!
Hi @Elevory , are these the versions you've upgraded to?

 
Still having issues on my end, does anyone have any ideas?






Code:
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GooglePlayServicesExtension.java:546: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
                RunnerJNILib.CloudResultData(s.getBytes(), 0 /*STATUS_NEW_GAME_DATA*/, fileId);
                            ^
  required: byte[],byte[],int,int
  found: byte[],int,int
  reason: actual and formal argument lists differ in length
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GooglePlayServicesExtension.java:560: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
            RunnerJNILib.CloudResultData( null, 0 /*STATUS_NEW_GAME_DATA*/, fileId );
                        ^
  required: byte[],byte[],int,int
  found: <null>,int,int
  reason: actual and formal argument lists differ in length
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GooglePlayServicesExtension.java:681: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
                                    RunnerJNILib.CloudResultData(s.getBytes(), 0 /*STATUS_NEW_GAME_DATA*/, fileId);
                                                ^
  required: byte[],byte[],int,int
  found: byte[],int,int
  reason: actual and formal argument lists differ in length
W:\com.dynamiczero.survivingtitan\src\main\java\com\dynamiczero\survivingtitan\GooglePlayServicesExtension.java:700: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
                    RunnerJNILib.CloudResultData( null, 0 /*STATUS_NEW_GAME_DATA*/, fileId );
                                ^
  required: byte[],byte[],int,int
  found: <null>,int,int
  reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
:com.dynamiczero.survivingtitan:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':com.dynamiczero.survivingtitan:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Many thanks
 

pipebkOT

Member
@dynamic_zero
do you have installed the older apis? android nougat 7.1.1, 7.0, marshmallow, lollipop, kit kat, etc. it looks in the image that not.

aside from that

https://www.reddit.com/r/gamemaker/comments/c9cywp/running_on_phone_no_longer_works_with_new_update/

is the same case as yours, and the solution was simply unistalling the google play services extension, cleaning the cache, and installing it again from the game maker "add ons" menu, which is in the "game options" menu
Thank you, I will give this a try and report back!
 

Kert Tamm

Member
I had the same issue after the latest v2.2.3.341 update and it was only with projects that had Google Play Services Add-On installed.

Fix:
Just remove the Google Play Services Add-On and then reinstall it. I also cleaned the cache like dynamic_zero said before compiling.
 
G

Guest

Guest
How are you guys getting the 3.1.2+ extension? Although the marketplace says 3.1.3, when I download and import it, I get only 3.1.0. Same result if I delete/redownload through the IDE's Library tab, and same result if I use Main > Options > Add-Ons.
 

pipebkOT

Member
@Justice they are the same version. they messup the versions numbers when they upload it

new 3.1.0 = 3.1.3, you can check that is the 3.1.3 by seeing if it has the android. ad framework 17.2.1 in the gradle inyections.

old 3.1.0 , 3.1.1 and 3.1.2 have the ad framework 16.0.0

Changes in 3.1.3

  • Fixed that some iOS libraries were missing, causing an "Undefined symbols for architecture armv7 build error"
  • Updated the Android ad framework referenced to 17.2.1
 
Last edited:

Dan

GameMaker Staff
GameMaker Dev.
Yeah, we have fixed the version number ready for the next release of that extension. Sorry for the confusion...
 
R

Racing4thefinish

Guest
Does anybody know why the Google Play Services Add-on isn't downloading? The menu shows the progress bar, but the bar doesn't move. My computer has enough storage, but the add-onjust isn't downloading. Thanks :)DownLoad PlayStore Issue.JPG
 
A

Andrea Sansone

Guest
Can anyone help me please? A few days ago GMS 2 runtime was updated to version -344, but testing my game on android I noticed that the YYC compiler initialized objects instead of others (With the VM compiler the game was played without problems). I downgraded the runtime and solved the problem. Today from nothing I get the usual error that comes from the Google PlayServices extension

*** build file '/Users/MyName/.config/GameMakerStudio2/Cache/GMS2CACHE/4Elements_B0DC71DE/Android/default/com.Sansonight.Elements/build.gradle': 50: unexpected char: '@ line 50, column 61.
ms: play-services-games: 16.0.0 '\ r \ ncompil
^
***
In the past I solved this error by re-importing the extension or updating it. The extension has been updated, android studio has been updated, android SDK has been updated but I still have this message. Searching on the internet I found myself in this discussion and discovered that, despite the marketplace marking as version 3.1.3, during the import the version changes to 3.1.0. I took one from an old project and discovered that the version is 3.1.2 but still does not work. Without extension the game is compiled without any problem. Does anyone know how I can fix it?
 
Top