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.

AppGameKit Classic Chat / Help with android instructions for tier 2 (v2)

Author
Message
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 25th Oct 2014 17:44
The instructions for tier2 says:
"To compile the tier 2 template app open cygwin and browse to the android template directory (cygwin is case sensitive and does not allow spaces in your project path), for example in my enironment that would be 'cd "/cygdrive/c/android/AGK/IDE/template/template_android" then try to compile the template with the path to the NDK installation e.g. "/cygdrive/c/android/android-ndk-r6b/ndk-build 2> log.txt" errors will be put in log.txt in the template_android folder. This compiles all the C++ code into the native library that will be the main part of the Android application."

But how exactly to COMPILE???
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Oct 2014 19:43
ohh, it was complicated,
i had only notes in german, i translated some of it.

that is my batch to start cygwin shell window (looks like cmd window)
Quote: "
@echo on
F:
chdir F:\Cygwin\bin
bash --login -i
"


cd to path where /jni/Android.mk make file is
Quote: "
cd f:\compile
cd interpreter_android
"


i believe it use the cd path
Quote: "
/cygdrive/f/android-ndk-r6b/ndk-build clean
/cygdrive/f/android-ndk-r6b/ndk-build 2> log.txt
"

same as F:/android-ndk-r6b/ndk-build 2> log.txt
the log.txt is here F:\Compile\interpreter_android

ndk-build starts compile with help of make file i believe.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 25th Oct 2014 20:16 Edited at: 25th Oct 2014 20:17
Thanks a lot Markus!
It is a really confusing and complicated inctructions...
And I already found a file inside each template called "HardCodedCompileScript.bat". It works, but I don't know what does it do... Cannot find any .apk file after that.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Oct 2014 21:51 Edited at: 25th Oct 2014 22:01
Search for a log.txt file there.
i believe .mk is the file extension for make.

i found a apk file in "BIN"
F:\Compile\apps\interpreter_android\bin\MyGame.apk

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini
fog
20
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Newcastle, England
Posted: 25th Oct 2014 23:02
The Android set-up for Tier 2 is stupidly complicated. Luckily once you have it set up the build process is pretty straightforward.

I'll assume you've set-up Eclipse in line with the instructions and added your C++ files, media etc.

Quote: "And I already found a file inside each template called "HardCodedCompileScript.bat". It works, but I don't know what does it do... Cannot find any .apk file after that."
That batch file just compiles the code.

After that check the log.txt file to see if there are any problems. If everything is ok then next you need to build the project.

In Eclipse select Project => Clean and in the new dialogue select the following options:
* Clean Projects Selected Below
* Start a build immediately
* Build only the selected projects
And finally make sure just your game/project has a tick next to it

When you select ok it will build your project. It's very quick.

Finally if you need an APK file then select File => Export and pick Export Android Application in the Android folder.

If you haven't one already then you will need to create a keystore to sign your APK but that's pretty straight forward.

Good luck!

Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 26th Oct 2014 18:06
Thank you guys, it works now! I didn't add to my project Facebook and Google push projects. But before I tried to run template_lite and got many errors, don't even know what was it...
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 27th Oct 2014 22:33
Also as a minor note, you can add the PAUSE command to the end of the BAT file and have a chance to review the errors before it just autocloses.

Glad it all works for you now.

Login to post a reply

Server time is: 2024-05-02 06:48:41
Your offset time is: 2024-05-02 06:48:41