• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • 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 IDE v2.3.4.580 - Google Play Service Extensions - failed build Android APK

I have created an android build with no issues with the new Google Play Service Extensions, but since the update of IDE v2.3.4.580, it fails to make the build.. when I remove the extensions, I can make a new build with no problem.. but if I add them, the build fails.. It seems like I have some Java issues.. I am using the Java version in Android Studios and it states found.. as mentioned earlier it was working in the previous IDE.. and now it broke..

I have followed these step perfectly https://help.yoyogames.com/hc/en-us/articles/115001368727-Setting-Up-For-Android-or-Amazon-Fire

And I've added the extension from the Marketplace mentioned in this thread https://forum.yoyogames.com/index.php?threads/hot-fix-billing-library-3-before-this-date-issue.85843

But I am stuck and don't know what to do to fix it.. I appreciate the help in pre-hand..


FAILED OUTPUT READS FOLLOWING
- - - - - - - - - - - - - -

> Task :library:compileDebugJavaWithJavac
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/ServerManagedPolicy.java:19: error: package org.apache.http does not exist
import org.apache.http.NameValuePair;
^
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/ServerManagedPolicy.java:20: error: package org.apache.http.client.utils does not exist
import org.apache.http.client.utils.URLEncodedUtils;
^
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/APKExpansionPolicy.java:20: error: package org.apache.http does not exist
import org.apache.http.NameValuePair;
^
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/APKExpansionPolicy.java:21: error: package org.apache.http.client.utils does not exist
import org.apache.http.client.utils.URLEncodedUtils;
^
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/ServerManagedPolicy.java:266: error: cannot find symbol
List<NameValuePair> extraList = URLEncodedUtils.parse(rawExtras, "UTF-8");
^
symbol: class NameValuePair
location: class ServerManagedPolicy
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/ServerManagedPolicy.java:266: error: cannot find symbol
List<NameValuePair> extraList = URLEncodedUtils.parse(rawExtras, "UTF-8");
^
symbol: variable URLEncodedUtils
location: class ServerManagedPolicy
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/ServerManagedPolicy.java:267: error: cannot find symbol
for (NameValuePair item : extraList) {
^
symbol: class NameValuePair
location: class ServerManagedPolicy
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/APKExpansionPolicy.java:382: error: cannot find symbol
List<NameValuePair> extraList = URLEncodedUtils.parse(rawExtras, "UTF-8");
^
symbol: class NameValuePair
location: class APKExpansionPolicy
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/APKExpansionPolicy.java:382: error: cannot find symbol
List<NameValuePair> extraList = URLEncodedUtils.parse(rawExtras, "UTF-8");
^
symbol: variable URLEncodedUtils
location: class APKExpansionPolicy
/Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/APKExpansionPolicy.java:383: error: cannot find symbol
for (NameValuePair item : extraList) {
^
symbol: class NameValuePair
location: class APKExpansionPolicy
Note: /Users/mikaelsegedi/.config/GameMakerStudio2/Cache/GMS2CACHE/Post_Apoca_33BAF5B3_5DA4541B/Android/Default/library/src/com/google/android/vending/licensing/LicenseChecker.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
10 errors

> Task :library:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':library: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. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 25s
23 actionable tasks: 23 executed


/Users/Shared/GameMakerStudio2/Cache/runtimes/runtime-2.3.4.442/android/runner/gradle/gradlew exited with non-zero status (1)

elapsed time 00:02:20.7721670s for command "/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono" /Users/Shared/GameMakerStudio2/Cache/runtimes/runtime-2.3.4.442/bin/Igor.exe -j=8 -options="/var/folders/1g/fbkyv0fx6gq1n72s8z0909_h0000gn/GameMakerStudio2/GMS2TEMP/build.bff" -v -- Android Package started at 09/11/2021 01:54:22

FAILED: Package Program Complete
For the details of why this build failed, please review the whole log above and also see your Compile Errors window.

- - - - - - - - -
 

jzavala

GameMaker Staff
GameMaker Dev.
Hi Mikael

You have "Use Google APK" and/or "use Google Dinamic Asset Delivery" enabled?
In the log appear this file: APKExpansionPolicy.apk i think not is related to GooglePlayService or GoogleIAPs extensions, so? which other extensions are you using?
1631328459924.png

Regards
 
Hi Mikael

You have "Use Google APK" and/or "use Google Dinamic Asset Delivery" enabled?
In the log appear this file: APKExpansionPolicy.apk i think not is related to GooglePlayService or GoogleIAPs extensions, so? which other extensions are you using?
View attachment 42906

Regards
I use following extensions from Google Play Service Extensions
1. GooglePlayAdsExtention
2. GooglePlayBillingExtention
3. GooglePlayLicensingExtentions

I tried to add all Google Play Service Extensions to see if that would fix it. but it did not work.

I never had the Use Google APK expansion or Use Google Dynamic Asset Delivery ticked in, I have never needed it.. since the game is small enough.. but I don't even know what Use Google Dynamic Asset Delivery does..

Note that I don't use any other Extensions and clear my cache every time I make a build..
 

jzavala

GameMaker Staff
GameMaker Dev.
First than all sorry for this inconvenience

I succeed replicate the issue and I found a hot fix for it.
This issue happen when you import extensions (no only AdMob) from marketplace or from "import local package" on the IDE 2.3.4 (we will fix it ASAP)

So, what to do?

Just generate a inoffensive change on the injections, example:

Open your extension click on in Extra Platforms section click on Android (you will need repeat for iOS then)
1631384942972.png
Then in Code injection text box press ENTER KEY to create a jump in the text
1631385119572.png

Then:
  • Close the extension
  • Save the project
  • Clean cache
  • Build

Please let me know if work for you too


Regards
 
First than all sorry for this inconvenience

I succeed replicate the issue and I found a hot fix for it.
This issue happen when you import extensions (no only AdMob) from marketplace or from "import local package" on the IDE 2.3.4 (we will fix it ASAP)

So, what to do?

Just generate a inoffensive change on the injections, example:

Open your extension click on in Extra Platforms section click on Android (you will need repeat for iOS then)
View attachment 42925
Then in Code injection text box press ENTER KEY to create a jump in the text
View attachment 42926

Then:
  • Close the extension
  • Save the project
  • Clean cache
  • Build

Please let me know if work for you too


Regards
No worries.. appreciate the help and I don't blame the developers since this is a hard software to QA and develop.. so we all appreciate your support..

I have not tried the fix since I managed to fix the issue with following solution found in https://forum.yoyogames.com/index.php?threads/admob-extension-cause-build-failed.89178

I reverted back to IDEv2.3.3.574 and runtime v.3.3.437.. and than made an android build that worked with no issues.. but it's good that we have a developer-fix that people can try out..

Thanks for the support and quick answer.. you guys are doing great work..

Regards,
Segedi Inc.
 

neochilds

Member
Funny enough going back to 574 work for compiling but the ads will not work on my game. I even removed all rooms and ensure that the old google asset was removed but the ads do not show.

I am running just the test room and the ads will not load I am just so confused now. I had spoken to Navidrct who fortunately made an updated video which helped me with the 580 version which I since uninstalled and went back to 574. But good grief this was a major setback as I don't program often and everything worked perfectly. Naturally I tell people never update a software mid project. Fortunately I make update folders and make copies of everything so I could go back with my work several levels back but that cost me time.

I am just so confused. At first I was tearing my head out that I broke something just to see Navidrct state the issue when he did his new video. 2 weeks wasted. sighs.

Oh and in the attached image does it matter if we leave the test id there for testing
also I have never seen this test ID

[app id deleted by moderator]
[image deleted by moderator]
 
Last edited by a moderator:

jzavala

GameMaker Staff
GameMaker Dev.
Hi neochilds

For production environment you need replace the AdMob ApplicationID in the extension injections,
Remember check the AppicationID each time that you update/download/import the extension

Regards
 

Hessery

Member
First than all sorry for this inconvenience

I succeed replicate the issue and I found a hot fix for it.
This issue happen when you import extensions (no only AdMob) from marketplace or from "import local package" on the IDE 2.3.4 (we will fix it ASAP)

So, what to do?

Just generate a inoffensive change on the injections, example:

Open your extension click on in Extra Platforms section click on Android (you will need repeat for iOS then)
View attachment 42925
Then in Code injection text box press ENTER KEY to create a jump in the text
View attachment 42926

Then:
  • Close the extension
  • Save the project
  • Clean cache
  • Build

Please let me know if work for you too


Regards
I can confirm that this worked for me
IDE v2.3.4.580 Steam Runtime v2.3.4.442
 

neochilds

Member
Hi neochilds

For production environment you need replace the AdMob ApplicationID in the extension injections,
Remember check the AppicationID each time that you update/download/import the extension

Regards
For Context
Using 574 not 580 for current build.
That part I understand which is why I used the that the admob generates which seems to be the one in all of my test builds.

The problem I am facing now is that with the current admob extension it will not generate a test ad.
Just to be aware it does it on clean and limited test project I did but certainly not on my production ready game which is on google store.
Fortunately I did not upload one of those version to production.

Prior to compiling I made sure to remove the old google services, I even found a back up which did not have the google services added but for some reason it will not generate test ads.

Now going back to the test ID which was in that injector that ID works on all my smaller test projects. So I assume it is not the issue but something else. I will test 580on another computer with a clean build of my game which does not have the services added and see what occurs

It does not show any error in the output. The build completes but ads will not trigger and again I am using the test sample room as the first and only room loaded.. Deleted all other rooms.
 

neochilds

Member
So thanks to some amazing ninja magic from @jzavala we found the issue as to why my build failed. The whole thread can be found at the link below.

Here is the final conclusion so far. this is from the discussion on the above linked thread.

Ok after some amazing work yesterday with @jzavala we have confirmed that Thank god I do not need to change my package name for the final build.

With how google can get with you viewing your own ads I am always on the fence with testing my own live ads until I know a code is perfect plus one of the first reviews I saw of the admob was actually by @brian
" I also am noticing that calling AdMob_SetTestDeviceId(); before the initialize function (which is how it is documented) does not seem to perform as advertised on Android at least, which could cause some bad effects the admob accounts of users running a lot of tests. "

So I was certainly not going to use my live codes either way long story short when I tested with the data in the admob with my game it failed. yes we now know about the space in the xml injection etc etc.

The most likely reason most test build work is due to the fact that most don't change their google package name on a test build so assumly this is a default so a general test will work which I did see but when I added this to my production game it would not work because all parts of the code work in tangent.

In short my package name is tied to my app id etc etc etc so without a proper AdMob_SetTestDeviceId() annotation you can get banned I can't afford that and I suppose many cannot afford that as well so be aware.

I am glad we ran into this now and did the necessary troubleshooting to get to a proper answer where I did not have to change my package name as that would have been a nightmare well not entirely for me but for someone else.

So what I have learnt from this is I can do a test and run test ads but I may have to change the package name which is a pain but is a work around I can live with until the fix is live.

THANKS AGAIN @jzavala I don't drink beer but we can get some wine one day you are one amazing chap. @Navidrct Thank you again also for doing the video and @brian your review of the admob may have saved a few souls if they were not aware that depending how you place that AdMob_SetTestDeviceId() you may get banned. Many are probably thinking that they are set to test mode with that "admobsetTest" declaration and don't realise they may be testing their own code and could have sever consequences on the admob side . Yeah I was not going to get banned at no cost, nope, nah I am good.

Thank you again and hopefully this helps the next person who may come across something similar and hopeful prevents peopel from being accidentally banned.
 

PinkySwear

Member
hey!
Sorry if its 50% irrelevent, but, am i the only one who cant find the Google Play Services extension on the marketplace? Trying to add ads in my game but cannot find the extension..
 

brian

Member
hey!
Sorry if its 50% irrelevent, but, am i the only one who cant find the Google Play Services extension on the marketplace? Trying to add ads in my game but cannot find the extension..
Hey PinkySwear, check right here: https://marketplace.yoyogames.com/assets/10078/google-admob
You shouldn't need the full Services extension to implement ads - make sure to read the full PDF that comes with the AdMob extension, it's great stuff!
 

PinkySwear

Member
oh , nice! thanks!
EDIT: hum, i cant seem to find the PDF..i installed the extention, but i dont see anywhere that i can download/read the PDF :S
 
Last edited:
Top