Hello there!
During these days a lot of fellow developers are asking me some hints for fixing their lint errors while exporting for Android using Game Maker Studio.
Sincerely I’ve had the same problem and around the web there are just a few clues about this issue, so I decided to write this simple tutorial, hoping it can be of help 🙂
So, yes, it’s a common issue, because lint is a new feature added to the Game Maker Studio build. If you are curious about lint itself and how to use it within your Android project, check this.
Ok. So, within your debug console you are getting something like this:
* What went wrong: Execution failed for task ':com.companyname.applicationname'. > Lint found errors in the project; aborting build. Fix the issues identified by lint, or add the following to your build script to proceed with errors: ... android { lintOptions { abortOnError false } } ... Eh, put like this, it is not giving us so many clues on how to fix it at all, right? Don't worry just, scroll the debug console up a bit and you will find a great hint! Check the screenshot: And what a great hint! In fact, it is a link to a well detailed and formatted lint output file! Here's what it looks like:
As you can see there are a lot of warnings and messages, but once again, don’t worry since each one of them is a link to a very detailed explanation!
Let’s ignore the warnings and focus on the error which is making our build fail. It is obviously the one with the red mark 🙂
In this case it says: “NewApi: Calling new methods on older versions”. It is still not enough for fixing, but as I told you, just clicking on it will give us great detailed information:
Ah-ah! Got it!
It seems that one of the extensions my game is using “requires API level 11” but “current min is 9” meaning that while that extension is made for the Android API level 11 and above, Game Maker Studio is building using API level 9 as minimum target.
So yeah, easy fix in this case: under “Global Game Settings” select the “Android/Fire” tab and change the Min SDK from 9 to 11 (or above).
Finally, for a correct build, don’t forget to clean the target up and keep your Android SDK and NDK updated, as explained in the official post, here: http://help.yoyogames.com/hc/en-us/articles/216753498-GameMaker-Studio-Android-SDK-and-NDK-setup-
–
So, as ever, when having a problem, is always nice to log as much as possible and deeply investigate all the error logs and console messages! ^^
–
Well, thanks for reading!
I hope this little tutorial can be helpful to you!
Happy Coding! 😀
Hi,
I have this errors:
Class referenced in the manifest, com.yoyogames.FacebookActivity, was not found in the project or the libraries
Class referenced in the manifest, com.facebook.LoginActivity, was not found in the project or the libraries
Somebody knows how to solve?
Thanks in advance
Hi Jose,
I can see from here:
https://forum.yoyogames.com/index.php?threads/problem-with-the-manifest.12471/
that you managed to fix the lint errors, with my tutorial, nice!
Now, about the Facebook issue, I don’t have a proper tested solution, because I’m not using that library at the moment and I can’t reproduce the bug.
By the way, here:
http://bugs.yoyogames.com/print_bug_page.php?bug_id=24051
Friz is suggesting to update Game Maker Studio to version 1.4.1763 to fix a similar issue.
They marked it as resolved, so, yeah, trying to update to GMS v1.4.1763 seems like a good thing to me.
After the update if you still get the same issue, you can always get support on yoyo game’s Mantis: http://bugs.yoyogames.com/view.php?id=24051
by adding your own comment!
Cheers! 😀
Thanks for reply.
I have updated but nothing changes.
It not works for me.
Well, at this point, since the Facebook extension is made by YoYoGames themselves, try to contact them with detailed information.
Here’s the support center:
http://help.yoyogames.com/hc/en-us
And here you can open a new ticket:
http://help.yoyogames.com/hc/en-us/requests/new
I hope you can find a solution soon! 🙂
Oh, when you do, please think about sharing the solution by updating your posts around the web (this one here, too, if you want) as reference for other developers, in case anyone else get stuck with similar issues, thanks!
I solved Changing the support library to 25 like the compile SDK
Thanks for your help
Very nice! I’m happy to hear that! 🙂
Yeah, it’s like a very common issue to get stuck with the SDK and min-SDK setup while working/building for Android with Game Maker Studio!
Many thanks for keeping this page up to date with the solution to your issue!
Cheers! 😀
Finally I can solve the problem within a week. Thank you for this guide. Hu hu … I’m really happy …