THIS IS ONLY FOR AGK1
Setting up Ecplise or Android Studio to debug native libraries on a real device
is a pain. Yesterday i've discovered that, visual studio 2015 community edition
is able to debug native android libraries without having to configure anything. Amazing!
I started to think if it would be possible to create an AppGameKit Template project,
to see if i am able to debug the code without much trouble, at the end VS uses
the android sdk and ndk to build the apk file. After some tests, I've finally managed
to port the AGK1 template_android_lite project to VS 2015. There are some restrictions
for the AppGameKit functions that call third part functions, such as admob, facebook etc.
but for debugging/testing the C++ core functions of our games it is perfect.
I've created a project template for VS 2015 that can simply be opened with VS.
The only thing I've removed from the template is the libAGKAndroid.a file, so
you have to put that file manually in the AGKTemplate.NativeActivity folder.
One other thing you have to configure on you system, is the additional include path
for the AppGameKit Header files. Right click on the AGKTemplate.NativeActivity project
and then configure the include path.
After that you should be able to build and run the template on a real android device.
I would like to post the template here on the forum, so that other devs can use
it to, but I don't know if it is ok for the game creators. As already mentioned
I've removed the libAGKAndroid.a file from the template.
Here is the download link for the template:
http://doubletap.bytechaos.de/AGKTemplate_VS20015CE.zip
The only things you have to do is:
- Copy the libAGKAndroid.a into the AGKTemplate.NativeActivity folder
- Fix the include path in Visual Studio so it can find the AppGameKit Header files.
- Set the JAVA_HOME environment variable to point to the JDK path.