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 / Strange Bug in Tier 2 template_google_android ?

AGK Developer
Years of Service
User Offline
Joined: 30th Nov 2015
Location: Bridgwater, UK
Posted: 5th Sep 2016 09:50 Edited at: 5th Sep 2016 09:55
Hello everyone,

As the title suggests, I think there may be a strange bug in the setup for Android Studio Apps using Tier 2!.. I started out by following the setup guide in the documentation as stated here.

All works perfectly right up to where you reach the end of the first section, which is:

•When you open the template_google_android app in android studio
•Edit and run the jiniCompile.bat batch file [this needs to be re-run after any code changes [e.g in the cpp files]]
•Run Makefile
•Then launch the app on either an emulated device or a real mobile phone.

So anyway like I say that works perfectly, the issues seem to start however after I follow the section labelled 'Creating a New Game Project'.

I should probably note the instructions don't seem to be the issue either it's more the outcome of following the instructions that produces the issue, which is:

•Copying the template_android_google app and renaming the folder
•and pretty much running the above steps

Now even if you DO or DO NOT rename the project through res/values/strings.xml and AGK2Template/src/main/AndroidManifest.xml, you would be led to believe that your app is running fine, as if you emulate or run it on a real device it will indeed seem as if it is displaying the correct app showing the FPS..

BUT this seems to be where I am hitting the error, I will explain now as it is really strange:

•If I do not rename anything and leave it literally as is from just copying the template_android_google folder and renaming it, as mentioned it seems as if it works fine, until you make any changes to the cpp files, for example if I were to add
for instance, then re-follow all the above steps [i.e re-compile the bath file, makefile, etc..], when I re-run the app it will still only display the current FPS rate..

•Even if I do decide to rename the app and follow the steps I get the same results.

•However an important thing to note here is that in the above where I do not rename it the app is installed as 'AGK2Template' which would be correct, but even if I do rename the project, for example to 'MyApp' just for examples sake, the app will indeed install on the phone as MyApp, but despite making any changes in the cpp file it will still proceed to only ever display the FPS rate...

•Now because of this and a lot of hair pulling I decided to try something really weird, and it seemed to conclude something strange...
It seems that despite everything even in my newly copied and created app that whenever the program is running it is running the original template_android_google app even if it is not open in android studio, I am baffled and have no idea how?

•I was able to verify this though by modifying the .cpp in template_android_google by adding a line like
to it and then running the 'MyApp' project.. this returns the results of template_android_google cpp files instead of the MyApp cpp files

So it seems no matter what even copying a project into a new folder and renaming, not renaming, it doesnt matter it only runs the code from template_android_google ???

I have no idea why and any help would be great!

I know I didn't explain it well so hopefully you get what I meant..


Login to post a reply

Server time is: 2019-08-18 17:16:09
Your offset time is: 2019-08-18 17:16:09