Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / [Tier 2] undefined reference to advert functions when compiling

Author
Message
KUICS
7
Years of Service
User Offline
Joined: 1st Aug 2012
Location: Australia
Posted: 5th Mar 2013 07:19
Hey all.
So I've successfully got my game running on both Windows and Android with no issues. Until now. Basically advertisements are being found and running fine on the Windows version (under Visual Studio 2010) but when I try to compile my Android copy I get undefined references to agk::SetAdMobDetails(char*) and agk::SetAdvertVisible(int).

Note that agk::CreateAdvert is found and apparently compiles fine, but the AdMob one and setting visibility don't. I can only assume that this is a version mismatch on my behalf.

I have my Android project separate from AppGameKit itself (as the guide recommended me to), however I updated its entire IDE folder (minus the templates folder) to be up-to-date with my Windows version. I thought that this would solve any version mismatch problems I was having.

Any help is appreciated as always.
- KUICS Australia PTY. LTD.

www.kuics.com - KUICS Australia PTY LTD
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Mar 2013 17:47 Edited at: 5th Mar 2013 17:49
Admob doesn't work in Windows, only for Android and iOS.

So, it probably isn't in the Windows libraries.

And, if you updated your core AppGameKit, there are updates that need to be done to your Android (and Windows) projects as well.

For Android, there are a lot of changes that need to be accounted for in v1088 (as opposed to v1076).

You would have been better off creating a new Android AppGameKit directory and creating new projects from the Android templates on the AGK Wiki Templates page. Then following the instructions on that pages for all of the changes that need to be made on a project-by-project basis (because you change the name and the package identifier for every project).

EDIT: You probably should have created a separate Windows AppGameKit install for the updated version (I have 5 different AppGameKit installs running side by side). Because there are some key changes in libraries and files specific to the projects. The Windows v1088 templates are on the same wiki page.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
KUICS
7
Years of Service
User Offline
Joined: 1st Aug 2012
Location: Australia
Posted: 7th Mar 2013 12:30
Thank you for your prompt reply.
Thanks for clearing that up, I've got separate installations running now. I also moved my project into the 1088 template and got it all to compile.

However the program now crashes on startup on Android. It happens with the default template (1088) as well as my game.
The error outputted by LogCat is as follows:
http://pastebin.com/1H8AXsuX

Please note that this error/crash does not occur when the advertisement functions are commented out.

These seem like obvious errors to fix, however I'm a novice at Android programming and am not really sure where to find these values it wants me to correct.

Again, thanks for any assistance.

www.kuics.com - KUICS Australia PTY LTD
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Mar 2013 20:12
This looks like a combination of something that should be happening in the AppGameKit stuff (which needs to be addressed by a TGC person) and setting the right values in the AndroidManifest.xml file (which I don't know about, but probably can be found with some research).

Try posting this in the AppGameKit Product Chat list (the TGC guys look at that more regularly).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
KUICS
7
Years of Service
User Offline
Joined: 1st Aug 2012
Location: Australia
Posted: 10th Mar 2013 15:18
Hmm the topic I made in the Product section doesn't seem to be provoking any activity so maybe I've somehow stumbled into a trap.
I'll do some extensive Googling and report back here if I can find a solution.

I'm sure it has to be something I'm doing because I can't find any other topics of people complaining about advertisements screwing up like this in Android.

www.kuics.com - KUICS Australia PTY LTD

Login to post a reply

Server time is: 2019-10-14 01:36:06
Your offset time is: 2019-10-14 01:36:06