Sei sulla pagina 1di 10

(http://www.thegamecreators.

com/)
FORUM HOME (/)

LOGIN (HTTPS://WWW.THEGAMECREATORS.COM/LOGIN)

developer forums (/)


Having login issues?
If you are having login issues, please logout and log back in at the main TGC website.

Search Forum (/search)

Android (/board/46) / [STICKY] Step by Step guide to creating a working .APK file.

Author

2 (http://forum.thegamecreators.com/thread/203424?page=2)

3 (http://forum.thegamecreators.com/thread/203424?page=3)

(http://forum.thegamecreators.com/thread/203424?page=2)

Message
Posted: 6th Feb 2013 14:39

Edited at: 7th Feb 2013 11:18

Link

Right, I have literally spent a whole week reading forum threads and messing about with files and codes etc to try and get a working .apk file for my phone. I have finally succeeded! and hopefully
made things easier for people.

LiamBradbury
Recently Online
Joined: 28th Apr 2011
Location: Manchester, UK

I thought I would create a step by step list of exactly how to do it to share with you guys as it seems most people are struggling the same as I did!
In this guide you don't need to open cygwin once, so no irritating cygwin coding.
Big thanks to Ancient Lady and MissJoJo for helping me with certain problems.
EDIT: I have attached my game app! the .apk file. controls are simple, just tap the screen to make the ball jump over obstacles, the more you jump, the faster it goes!
First off, update to the latest version of AGK (v108) and make sure you have your AGK app finished and ready to go! then follow these steps.
Follow these steps exactly, everything is case sensitive!
---------------------------1./ Press "START + E" on your keyboard to open windows explorer
2./ double click on your "C:" to open it
3./ make a new folder here called "Android"
4./ download eclipse classic (32bit version NOT 64 even if you have 64bit) from http://www.eclipse.org/downloads/ (/outbound?url=http%3A%2F%2Fwww.eclipse.org%2Fdownloads%2F)
5./ copy the downloaded ZIP file of eclipse into your "Android" folder and extract it. you should now have a new folder called "eclipse" in your "Android" folder
6./ goto http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html (/outbound?
url=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk7-downloads-1880260.html) and download the Java SE development kit 7 (JDK 7) for your operating
system (can be 32 or 64bit)
7./ install JDK 7
--------------------------------ANDROID SDK
8./ goto http://dl.google.com/android/installer_r17-windows.exe (/outbound?url=http%3A%2F%2Fdl.google.com%2Fandroid%2Finstaller_r17-windows.exe) the download should start
automatically.
9./ once downloaded click on installer_r17-windows.exe to launch the installer (dont just click through! read the next steps!)
10./ on the first screen of the installation make sure it says "Java SE Development kit (JDK) version 7 has been found" - if not then close installation and repeat step 7.
11./ on the next screen of the installation it will ask you for a destination folder, change it to "C:\Android\android-sdk" and click next then install, once the files have finished installing make sure
the "Start SDK manager" box is ticked and click "Finish"
12./ The Android SDK manager will now launch, wait for it to fetch all the files, then remove all ticks from all boxes next to the packages
13./ you may have to install an upgrade to Android SDK Tools and Platform (the first 2 tick boxes) so make sure nothing is ticked then tick the "Android SDK Tools" box and the platform one
underneath it.
13./ place a tick in the "obsolete" box and tick the "Android 2.3.1" box, and also the Android 3.2 box, and the google USB driver box near the bottom, make sure nothing else is ticked. now click
install packages, tick accept all and install.
14./ It will now install the SDK packages, if you see a red error code saying "Stopping ADB server failed", just ignore it. once done close the SDK manager.
---------------------------------ECLIPSE SOFTWARE INSTALLATION
15./ navigate to you C:/Android folder and create a new folder called "Workspace"
16./ navigate to C:/Android/eclipse and double click on eclipse.exe to launch it.
17./ you will see a box asking for a workspace destination folder, click browse and select the newly created "Workspace" folder in your Android folder. tick the "do not ask again" box and click ok.
18./ once the IDE has launched, click on "Help" then "Install New Software"
19./ Click "Add" in the top right corner
20./ in the name field type in ADT plugin
21./ in the address bar underneath type in "https://dl-ssl.google.com/android/eclipse/" and click ok (if this fails then try "http" instead of "https")
22./ wait for second for the software to show up then place a tick in "Developer Tools" and click next, accept the terms of license agreements and click on finish, it will start installing the software,
if you get a security warning saying the software includes unsigned software then just click ok and let it continue. you may also get a firewall warning, make sure you allow full access if you do.
23./ click restart now when it asks you.
24./ once eclipse has restarted, click "Window" then "Preferences" and click on "Android" from the list on the left. make sure the SDK location is set to "C:/Android/android-sdk" if it isn't then
change it to this location. click ok
25./ click on "Help" then "Install New Software", at the top there is a drop down menu, click it and select "All Available Sites"
26./ scroll down through the list that it creates until you see "Programming Languages", click on the expand icon next to it while ensuring that you dont tick the box, now you should see "C/C++
Development Tools", place a tick next to that and click NEXT
27./ accept agreements and click finish, wait for software to install then click "restart now", once restarted, close eclipse.
----------------------------------

ANDROID NDK R8D


28./ goto http://developer.android.com/tools/sdk/ndk/index.html (/outbound?url=http%3A%2F%2Fdeveloper.android.com%2Ftools%2Fsdk%2Fndk%2Findex.html) and download the "androidndk-r8d-windows.zip" file
29./ navigate to your C:/Android folder and place this ZIP file in there and extract it
---------------------------------INSTALL CYGWIN
30./ goto http://cygwin.com/install.html (/outbound?url=http%3A%2F%2Fcygwin.com%2Finstall.html) and click the hyperlink in the first sentence which says "setup.exe" which will download the
file.
31./ run the setup.exe file, click next on the 1st page, on the 2nd click the "install from internet" option and click next
32./ on the next page you will be asked for a root directory, type in "C:/Android/cygwin" - (remember everything is case sensitive), then click next
33./ you will then be asked for the local package directory, change this to "C:/Android/cygpackage", then click next.
34./ ensure "direct connection" is selected and click on next
35./ click on the 3rd website from the top when it asks you for a download site (they all work, but some are quicker than others, this is the one I used), then click next.
36./ click ok on any alert messages as it downloads.
37./ you will then be shown a window asking you to select packages, type in "Make" in the search box at the top, then click the plus sign next to "Devel" to expand it, near the bottom you'll see
"make: The GNU version of the 'make' utility", click on "skip" to the left of this one so that the numbers 3.82.90-1 are shown. now click next
38./ wait until downloads are finished.
------------------------------COPYING THE INTERPRETER
39./ navigate to C:/Android folder and create a new folder called "AGK" (all caps)
40./ open the AGK folder, press START + E to open a new window and navigate to your "C:/program files/the game creators/AGK" folder, copy the folder named "IDE" and paste it to
"C:/Android/AGK" folder.
------------------------------COMPILE AGK PLAYER
41./ navigate to "C:/Android/AGK/IDE/apps/interpreter_android" folder and right click on the file "HardCodedCompileScript.bat" then select "open with notepad"
42./ highlight all the text and delete it, then paste this

+ Code Snippet

EDIT: capital letter mistake on the Android folder. FIXED


make sure the speech marks are copied at the end of the 2nd and 3rd lines! save and close the file.
43./ now double click the file you just edited, the script should run and automatically compile the project for you, no need for any cygwin coding!
-------------------------------BUILD AGK PLAYER IN ECLIPSE
44./ open eclipse again
45./ close the welcome screen, on the left side you should see the package explorer, right click anywhere on this and select "import", expand the general option and select "existing project into
workspace", click next
43./ Click browse at the top and browse to C:/Android/AGK/IDE/apps/ and select the "interpreter_android" folder, then click ok and finish. you should now see the "AGK Player" folder on the left
hand side and also lots of errors!
44./ again, right click on the package explorer and click import, and again existing project into workspace, this time import the folder "C:/Android/AGK/IDE/apps/facebook", click ok then finish. you
should now see "FacebookSDK" on the left side and also some of the errors disappeared!
45./ right click on "AGK Player" in the package explorer and select properties, click on "Java compiler" and UNtick the "enable project specific settings" box at the top, click ok.
46./ Click "File" then "Open File", navigate to "C:/Android/AGK/IDE/apps/interpreter" and open the file "interpreter.cc", press CTRL + F, type in "#ifdef IDE_ANDROID" and click find, you should see
a line of text which says:

+ Code Snippet

delete the "//" at the start to comment this in to the code. click file and then save.
47./ right click the AGK Player file in the package explorer window and click "Android Tools" then click "Fix Project Properties" then click on "Project" at the top and then click "Clean", make sure
"clean all projects" is selected, then click ok. now you should see no errors! any yellow warnings don't matter.
48./ click on "Run" at the top and then "Run" again. the AGK player is now built!

------------------------------CREATE YOUR GAME FOLDER


49./ navigate to "C:/Android/AGK/IDE/apps" and copy and paste the "interpreter_android" folder
50./ rename the copied folder to your games name - with NO spaces.
51./ open up your games folder that you just created, there will be a red file inside with a blank name - ".project", right click this and open with notepad
52./ on the 3rd line change "AGK Player" to your games name - no spaces. save and close.
53./ right click on the "AndroidManifest.xml" file and open with notepad
54./ read through the code and change ALL instances of "com.thegamecreators.agk_player" to "com.yourcompanyname.yourgamename" - not exactly that text but whatever your company name
is and then whatever your games name is, with no spaces! I think there are 8 of these that need changing so look carefully! save, then close.
55./ open up the res folder contained in your games project folder, open the values folder, right click on "strings.xml" and open with notepad
56./ on the 3rd line change "AGK Player" to your games name, here you can have spaces as this is what text is shown on a phone for the app name. save and close.
57./ go back to your games project folder - "C:/Android/AGK/IDE/apps/*gamename*" if there is no folder called "assets" here then create it - case sensitive!
58./ open the assets folder and create another folder called "media" - case sensitive!
59./ press START + E to open a new window and navigate to your AGK project folder - "C:/Program Files/The Game Creators/AGK/Projects/*Basic or native*/*project name*
60./ open the "media" folder and copy everything within this folder and paste it to your "C:/Android/AGK/IDE/apps/*gamename/assets/media" folder

61./ close the "C:/program files/the game creators/agk etc" window if you haven't already.
62./ navigate to "C:/Android/AGK/IDE/apps/*yourgamename/assets/media" folder and rename the .byc file from your games name to "bytecode.byc"
63./ go back to your games main project folder - "C:/Android/AGK/IDE/apps/*gamesname" and double click the file "HardCodedCompileScript.bat", wait until it is finished.
--------------------------------IMPORT GAME FOLDER INTO ECLIPSE and EXPORT .APK
64./ navigate to "C:/Android/AGK/IDE/apps/*gamename/src/com/thegamecreators/agk_player" and right click the file "IAPActivity.java" open with WORDPAD (not notepad)
65./ around line 20 there will be a line that reads:

+ Code Snippet

delete the "//" to comment this in to the code. also, change it to "com.*yourcompanyname.*yourgamename.R" - the same as you typed before in the "AndroidManifest.xml" file, make sure you
keep the .R at the end. save it and close.
66./ in the same folder open up "MyFacebookActivity.java" in WORDPAD, do the same for line 7, delete the "//" and change it to "com.*yourcompanyname.*yourgamename.R". save it and close.
67./ go to your games main project folder - "C:/Android/AGK/IDE/apps/*yourgamename" and double click the "HardCodedCompileScript.bat"
68./ once that has finished, open eclipse
69./ right click on the package explorer window and click "import", then click "existing project into workspace" then browse for your games folder - "C:/Android/AGK/IDE/apps/*gamename" and
click ok then finish.
70./ right click on your games project folder in the package explorer and click "Android Tools" then click "Fix Project Properties"
71./ click on "Project" at the top then click "Clean", you should now have no errors.
72./ click on "File" then "Export" then expand the Android option and select "Export Android Application" then click next
73./ select your games project from the browse window and click next
74./ create a new keystore by filling in the details - the location is where you want to store it and the filename, create a password for it and confirm the password, then fill in your details - (the
validity MUST be over 50 years. I put 1000 just to be on the safe side.) then select your destination path for the .APK file - you can reuse the keystore for every app you create for android.
75./ you now have a working .apk file! just copy the .apk file to your phone and run it from your phone!, if there are errors then you have either gone wrong somewhere in this list, or there is an
error with your AGK code.

SOME TIPS!:
* make sure you program in your music and sound files on AGK in the correct casing e.g if the file name is "Music.mp3" then don't type "music.mp3" type it with a capital M.
* Test your app on as many android devices as possible.
* This help list will only work on Android 2.3.1 or above operating systems

www.liambradburymusic.com - professional music for your games at low prices!

Attachments
Login to view attachments
Back to top

Profile (/user/bded943424feae722075efd4932dfeca)

PM (/pm/new/bded943424feae722075efd4932dfeca)

Email (mailto:liambradbury@live.co.uk)

Website (www.liambradburymusic.com)

Posted: 6th Feb 2013 15:25

Link

Outstanding LiamBradbury!

Ancient Lady
Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

The process for building a Tier 1 Android project has gone through a lot of changes since the first release and you've captured all of it into one clean space.
Most of it is also applicable to Tier 2 development. When I find the time, I will use your post as a basis for a similar set of instructions for Tier 2 development (and it might even help me get the
v1088 Android Template working).
Please, will a moderator sticky this post? It is one of the more useful ones in this forum.
Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 6th Feb 2013 15:27

Link

another thing, once you have done all of this, you only have to do from step 49 for your next apps as everything else will be set up already.

LiamBradbury

www.liambradburymusic.com - professional music for your games at low prices!

Recently Online
Joined: 28th Apr 2011
Location: Manchester, UK

Back to top

Profile (/user/bded943424feae722075efd4932dfeca)

PM (/pm/new/bded943424feae722075efd4932dfeca)

Email (mailto:liambradbury@live.co.uk)

Website (www.liambradburymusic.com)

Posted: 6th Feb 2013 15:29

Link

thanks ancient lady! couldn't have done it without your help

LiamBradbury

www.liambradburymusic.com - professional music for your games at low prices!

Recently Online
Joined: 28th Apr 2011
Location: Manchester, UK

Back to top

Profile (/user/bded943424feae722075efd4932dfeca)
Posted: 7th Feb 2013 05:02

Edited at: 26th Mar 2013 06:35

This will definitely be of help to beginners

easter bunny

PM (/pm/new/bded943424feae722075efd4932dfeca)

Email (mailto:liambradbury@live.co.uk)

Website (www.liambradburymusic.com)
Link

easter bunny

Dodge those Balls, awesomest app on the Play Store (/outbound?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.joshwebsites.DodgeThoseBalls)

Recently Online
Joined: 20th Nov 2012
Playing: Dota 2

Back to top

Profile (/user/9dabdfbd6a66b4d91394854b00d1ccca)

PM (/pm/new/9dabdfbd6a66b4d91394854b00d1ccca)

Email (mailto:developer@audaciagames.com)

Website (http://www.audaciagames.com/)

Posted: 7th Feb 2013 11:32

Link

Ok, I've been running through this on a couple of my PC's and so far have had the following problems...

=PRoF=
Recently Online

Quote: "13./ place a tick in the "obsolete" box and tick the "Android 2.3.1" box, and also the Android 3.2 box, and the google USB driver box near the bottom, make sure nothing else is ticked.
now click install packages, tick accept all and install.
"

Joined: 17th Mar 2003


Location: Milton Keynes, UK

None of the Android boxes were there, nor the USB one. I had to first Install the 1st 2 things first, and then come back to it and select them on the 2nd run.

Quote: "48./ click on "Run" at the top and then "Run" again. the AGK player is now built!"

All I am getting here is a dialogue which says "The selection cannot be launched, and there are no recent launches."
Bit of a show stopper I'm afraid.

(/outbound?url=http%3A%2F%2Fwww.warriorsofthecucumber.com)

Bitmap Font Creator Alpha Out Now! (/outbound?url=http%3A%2F%2Fdigs.by%2FkiI2ZB)

Back to top

Profile (/user/00c75dddd861f95264bffbee449ed9e0)

PM (/pm/new/00c75dddd861f95264bffbee449ed9e0)

Email (mailto:famishedgibbon@hotmail.com)

Website (http://www.warriorsofthecucumber.com)

Posted: 7th Feb 2013 15:13

Link

The first time you go to run the app in Eclipse, you should right click on the project, select 'Run As' from the pop-up menu and then select 'Android Application'. Then it will run (or try to).

Ancient Lady
Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

Back to top

After you've done that the first time, Eclipse knows the run mode and will use it when you click on the 'Run' button.

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 7th Feb 2013 18:06

Link

Ok, I have successfully managed to get this to work.

=PRoF=

Thank you LiamBradbury and Ancient Lady

Recently Online
(/outbound?url=http%3A%2F%2Fwww.warriorsofthecucumber.com)

Joined: 17th Mar 2003


Location: Milton Keynes, UK

Bitmap Font Creator Alpha Out Now! (/outbound?url=http%3A%2F%2Fdigs.by%2FkiI2ZB)

Back to top

Profile (/user/00c75dddd861f95264bffbee449ed9e0)

PM (/pm/new/00c75dddd861f95264bffbee449ed9e0)

Email (mailto:famishedgibbon@hotmail.com)

Website (http://www.warriorsofthecucumber.com)

Posted: 9th Feb 2013 09:48

Link

After step 47 I've got next errors in eclipse:

risecreature
Recently Online
Joined: 10th Oct 2012
Location:

Back to top

Description Resource Path Location Type


The project cannot be built until build path errors are resolved AGK Player Unknown Java Problem
Unparsed aapt error(s)! Check the console for output. AGK Player line 1 Android ADT Problem
The project cannot be built until build path errors are resolved FacebookSDK Unknown Java Problem
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties. FacebookSDK line 1 Android ADT Problem
The container 'Android Dependencies' references non existing library 'C:\android\AGK\IDE\apps\facebook\bin\facebooksdk.jar' AGK Player Build path Build Path Problem
Project 'FacebookSDK' is missing required source folder: 'gen' FacebookSDK Build path Build Path Problem

Profile (/user/2aae21402c749931ab754445009b9872)

PM (/pm/new/2aae21402c749931ab754445009b9872)

Posted: 9th Feb 2013 17:18

Link

In the project.properties for your project does it have these line:

Ancient Lady
Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

+ Code Snippet

If your project is in a directory other than IDE/apps, you need to adjust the path to the facebook directory. For example, in the template (that still doesn't work) that is in the IDE/templates
directory, the line is:
+ Code Snippet

If that is the fix you need, remember to refresh the projects in Eclipse (select the project in the project explorer and click on the F5 key, and it does not provide any feedback).
Also, in for all of the projects in Eclipse, right click on the project and select 'Properties' from the pop-up menu. Click on 'Java Compiler', check 'Enable project specific settings' and select '1.6' from
the drop down next to 'Compiler compliance level:' and click on 'Apply'.

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 9th Feb 2013 20:03

risecreature
Recently Online

Link

Version of AGK is 1.088. I've didn't changed anything, ran it as is.


Regarding this file, project.properties, first was "target=android-13"
instead of "target=android-9"
After I changed it, nothing has changed even when I refresh the project.
About the "Properties", for AGK player I can choose 1.6, but for Facebook SDK I can't choose 1.6, only 1.7.
Also, If I make "fix properties for project" for facebook SDK, I get many errors (about 108 errors).

Joined: 10th Oct 2012


Location:
Back to top

Profile (/user/2aae21402c749931ab754445009b9872)

PM (/pm/new/2aae21402c749931ab754445009b9872)

Posted: 11th Feb 2013 22:44

Link

Can I assume that you are trying to compile AGK/IDE/apps/interpreter_android?

Ancient Lady
Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

Back to top

When you went to the properties for the FacebookSDK, did you check 'Enable project specific settings' in the Java Compiler page? (I know the instructions in this thread's original post say to
uncheck it, but you need to check it so that you can select 1.6.)
When you look at the Android SDK Manager (from the Window menu option), which Android versions are installed? Eg. "Android 4.2 (API 17)" and "Android 3.2 (API 13)".

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 12th Feb 2013 16:55

Link

I just used the guide to set up an Android v1088 Tier 1 test app and it definitely helped.

Ancient Lady
Recently Online

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Joined: 17th Mar 2004


Location: Anchorage, Alaska,
USA

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 12th Feb 2013 23:41

Link

Maybe someone can clarify point 54 for me

TrezSoft
Recently Online
Joined: 8th Nov 2012
Location: Germany

Quote: "54./ read through the code and change ALL instances of "com.thegamecreators.agk_player" to "com.yourcompanyname.yourgamename" - not exactly that text but whatever your
company name is and then whatever your games name is, with no spaces! I think there are 8 of these that need changing so look carefully! save, then close."

I only change the first instance as in the help file which states: (which seems to work fine)
Open the AndroidManifest.xml in WORDPAD, or Eclipse using the AndroidManifest.xml tab to see the source, and change the package field package='com.thegamecreators.agk_player' near the
top to your own Unique pacakage name (i.e. com.yourcompany.yourappname), do not change any other instance of "com.thegmaecreators.agk_player" in this or any other file, this is important!

Back to top

Profile (/user/7e25bb5d0b42a5a77259283ef8b710dc)

PM (/pm/new/7e25bb5d0b42a5a77259283ef8b710dc)

Email (mailto:stuart.tresadern@live.de)

Website (http://www.trezsoft.de)

Posted: 13th Feb 2013 01:30

Link

I have compiled and published an app with only changing the first instance of it, so you don't have to change all of them

easter bunny

There are 10 types of people, those who understand binary and those who don't

Recently Online
Joined: 20th Nov 2012
Playing: Dota 2

Back to top

Profile (/user/9dabdfbd6a66b4d91394854b00d1ccca)

PM (/pm/new/9dabdfbd6a66b4d91394854b00d1ccca)

Email (mailto:developer@audaciagames.com)

Website (http://www.audaciagames.com/)

Posted: 13th Feb 2013 10:05

Link

@MissJojo: The question is which way is correct ! i can get it to work with both methods.

TrezSoft
Recently Online
Joined: 8th Nov 2012
Location: Germany

Back to top

Profile (/user/7e25bb5d0b42a5a77259283ef8b710dc)

PM (/pm/new/7e25bb5d0b42a5a77259283ef8b710dc)

Email (mailto:stuart.tresadern@live.de)

Posted: 13th Feb 2013 15:39

Website (http://www.trezsoft.de)
Link

I was given the instructions to change only three of the instances to my own name by the AGK Developer Paul.

Ancient Lady
Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

Only the ones mentioned in the instructions on the AGK Wiki Templates (/outbound?url=http%3A%2F%2Fappgamekit.wikispaces.com%2FTemplates) page mentioned in the "Android Project and
Product Name AND Fix the "Missing Class R" errors:" section are to be changed.
The other instances are needed to tie into the basic agk engine provided in the src/com/thegamecreators files.
It is only in v1085+ that you need to change more than the package name on line 4.

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 14th Feb 2013 14:29

Link

I changed all instances with no issues.

Mobiius
AGK Developer

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]

Recently Online
Joined: 27th Feb 2003
Location: The Cold North

Back to top

Profile (/user/02c9287b9f064bdc40bd0f3a2b01fc7d)

PM (/pm/new/02c9287b9f064bdc40bd0f3a2b01fc7d)

Email (mailto:forums@teamdefiant.co.uk)

Website (http://www.teamdefiant.co.uk)

Posted: 24th Feb 2013 04:17

Talairina

Link

I followed these instructions at the top and it all worked perfectly. Copied the apk across and installed it fine also. Went to launch it and it just black screened then closed out. Double checked
everything and discovered there was two rem lines relating to bytecode.byc in interpreter.cpp. After removing the comment on the second line (having already done the first) I rebuilt the apk,
reinstalled it and everything is working great now.
It's all great now though, thank's for the instructions. Just thought I'd share my experiences.

Recently Online
Joined: 9th Jan 2006
Location: United Kingdom
Back to top

Profile (/user/b7dd039227b314da57d5a986af5304b6)

PM (/pm/new/b7dd039227b314da57d5a986af5304b6)

Posted: 24th Feb 2013 18:59

Link

i am stuck on step 40 - i have no AGK nor IDE folder anywhere in my The Games Creator folder

Snaggletooth
Recently Online
Joined: 2nd Feb 2010
Location:
Back to top

Profile (/user/f5d221247f80f7fe8b26adf35858b682)

PM (/pm/new/f5d221247f80f7fe8b26adf35858b682)

Posted: 25th Feb 2013 16:48

Link

When you installed your AGK, where did you put it? That is the directory to look for.

Ancient Lady
Recently Online

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Joined: 17th Mar 2004


Location: Anchorage, Alaska,
USA

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 3rd Mar 2013 15:00

Link

Quote: "In the project.properties for your project does it have these line:

BatVink
Moderator
Recently Online
Joined: 4th Apr 2003
Location: Gods own County, UK

+ Code Snippet
target=android-9
android.library.reference.1=../facebook
"

Thank you

Please add this to the original post, it looks important from at least Beta 7 onwards.

(/outbound?url=http%3A%2F%2Fadg.devink.co.uk%2Findex.php%3Foption%3Dcom_k2%26amp%3Bview%3Ditem%26amp%3Bid%3D63%3Apileemup)

Back to top

Profile (/user/4088beb5d4fb6fb9305165987210f61c)

PM (/pm/new/4088beb5d4fb6fb9305165987210f61c)

Email (mailto:steve@thegamecreators.com)

Posted: 3rd Mar 2013 23:04

Link

I've had to make a change to your process, in 1076 which might be why?

BatVink
Moderator

Quote: "60./ open the "media" folder and copy everything within this folder and paste it to your "C:/Android/AGK/IDE/apps/*gamename/assets/media" folder"

Recently Online
Joined: 4th Apr 2003
Location: Gods own County, UK

I put everything in the assets folder, not assets/media. Otherwise, it didn't run.

(/outbound?url=http%3A%2F%2Fadg.devink.co.uk%2Findex.php%3Foption%3Dcom_k2%26amp%3Bview%3Ditem%26amp%3Bid%3D63%3Apileemup)

Back to top

Profile (/user/4088beb5d4fb6fb9305165987210f61c)

PM (/pm/new/4088beb5d4fb6fb9305165987210f61c)

Posted: 11th Mar 2013 15:44

Email (mailto:steve@thegamecreators.com)
Link

Is there a detailed guide like this for tier 2?

wargasmic
Recently Online
Joined: 15th Oct 2006
Location: UK
Back to top

Profile (/user/7801fddd47ac148ae984ab0b76b4f86a)
Posted: 11th Mar 2013 16:14

Tier 2 is similar.

PM (/pm/new/7801fddd47ac148ae984ab0b76b4f86a)
Link

Tier 2 is similar.

Ancient Lady
Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

The basic Android setup is the same.


But you then start from a template instead of copying interpreter_android. v1076 and v1088 templates are available from the AGK Wiki Templates (/outbound?
url=http%3A%2F%2Fappgamekit.wikispaces.com%2FTemplates) page.
There are lots of instructions on that page for things to do with each platform and some specific ones for dealing with v1088 (because of FaceBook and stuff).
Once you've created the initial template and copied all of your own files into the jni directory, remember to the <andproj>/jni/Android.mk file between Core.cpp and template.cpp (just the .cpp
files).
You can skip steps dealing with the interpreter and Player, since they are Tier 1 specific. However, make sure to do the steps to install the Facebook project in Eclipse (step 44 under "BUILD AGK
PLAYER IN ECLIPSE").
For step 49, copy the template_android<version> directory (suggested installation is IDE/templates directory) instead of the interpreter_android one. Then look at the instructions for Android on
the AGK Wiki Templates page.
If you are working in v1088, the HardCodedCompileScript.bat batch file can be used, instead of going into cygwin and messing with ownership and permissions. You can create your own
HardCodedCompileScript.bat for v1076 as well and it will work.
But you must remember to make the changes discussed on the Wiki page, especially for v1088, or the Eclipse process won't work.

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 20th Mar 2013 10:13

Link

Hi, up to step 24 everything went ok, after restarting Eclipse doing step 24 I have no "Android" in the left side list, any suggestions to fix this? Thanks

EricW
Recently Online
Joined: 17th Jan 2013
Location:

Back to top

Profile (/user/ebb93941e6db7b4077a96348c3cb4afe)

PM (/pm/new/ebb93941e6db7b4077a96348c3cb4afe)

Posted: 20th Mar 2013 21:35

Link

I assume that you completely exited Eclipse. Is that correct?

Ancient Lady
Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

Back to top

If not, you should. The auto restart doesn't seem to really work properly.

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 21st Mar 2013 07:19

EricW

Link

Yes, I restarted Eclipse after it restarted itself with the same result, also I tried importing interpreter_android which gives me the AGK Player in the Package Explorer but right clicking on it does
not show Android either, I also deleted everything and started from scratch but still no luck, I'm at a loss at this point. I'm using Windows 7 and downloaded Java SE 7 for 64 bit all other programs
are 32 bit. Thanks

Recently Online
Joined: 17th Jan 2013
Location:

Back to top

Profile (/user/ebb93941e6db7b4077a96348c3cb4afe)

PM (/pm/new/ebb93941e6db7b4077a96348c3cb4afe)

Posted: 21st Mar 2013 15:21

Link

Were you very careful to read and follow and verify all the steps (as appropriate) under ANDROID SDK (steps 8-14)?

Ancient Lady
Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

Back to top

When you got the point (under the Eclipse install) that you restarted Eclipse, were you asked for the Android SDK path (and you then should have selected Existing Android installation)?
If not, you must tell Eclipse where you installed the Android SDK, go to the Window->Preferences menu option, choose the "Android" option on the left hand side, then enter the SDK path
(installed earlier) into the "SDK Location" field. Click Apply, and then OK.

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 23rd Mar 2013 10:28

EricW

Link

I had no problem with steps 8-14 Adroid 2.3.1 and 3.2 were installed successfully. Step 10 I had 'Java SE Development Kit (JDK) version 1.7 has been found' as apposed to version 7 as described in
step 10, that's the only difference I can see but it was jdk-7u17-windows-i586.exe that I installed. In step 20 It is "ADT plugin" not just "ADT" that I type in? (ADT plugin) is what I typed. When I do
step 20-21 Eclipse tells me Andoid is installed, I have Java and C/C++ on the left side still no Andoid. I wondering if anyone else has or had this problem.

Recently Online
Joined: 17th Jan 2013
Location:

Back to top

Profile (/user/ebb93941e6db7b4077a96348c3cb4afe)

PM (/pm/new/ebb93941e6db7b4077a96348c3cb4afe)

Posted: 23rd Mar 2013 16:27

Link

I don't know if anyone else has had the same problem. And I don't think I can help you any further with it. This is the kind of thing that I would have to be in front of your computer to poke about
and see why it's not working.

Ancient Lady

Sorry and good luck. Maybe someone else has some insight about this.

Ancient Lady

Sorry and good luck. Maybe someone else has some insight about this.

Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

Back to top

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 24th Mar 2013 03:36

Link

Thanks for trying to help, if I solve it I will post the solution, I'll dig a little deeper and also install AGK on another computer, assuming all goes well I can compare the installations.

EricW
Recently Online
Joined: 17th Jan 2013
Location:

Back to top

Profile (/user/ebb93941e6db7b4077a96348c3cb4afe)
Posted: 24th Mar 2013 21:55

PM (/pm/new/ebb93941e6db7b4077a96348c3cb4afe)

Edited at: 25th Mar 2013 20:52

Link

Sorry for the multiple edits. I've removed the original post since no one has replied and it seems it was simply an issue of me not following directions to the T.
Not sure where I went wrong...

Naphier
Recently Online
Joined: 2nd Oct 2010
Location: St Petersburg, Florida

At any rate, I've successfully compiled the player and I tested it out with broadcasting my game from the AGK IDE. It worked fine.
I'm a little confused on whether I should remove the AGK Player project from the package explorer in Eclipse before compiling my game or not. Logically it seems like I would. I've tried it both
ways and each way the game's APK compiles fine, installs fine, but when I run it I get a blank screen for a second and then the app exits. This happens if I run the app from Eclipse with my Nexus
7 plugged in and also if I actually export the APK, copy it to the Nexus, and install it. This also appears to be the same case with my HTC Incredible 2.
I noticed one person here state that they needed to move all of their media to the "assets" folder instead of "assets/media" but I am thinking that is only for 1076 and I tried it both ways for this
project with no success.
At this point I'm at a loss of what to do or try. I've recreated the project 3 times now and end with the same result...1 second of black screen then immediate exit.
The only difference I have from the instructions is that I have had to install NDK r8e since r8d is no longer available and I can not find it for download.
My game is done now and I'd really like to push it out for beta testing this week.
If anyone can help, maybe even hop on IRC (we can log the results here after we figure it out), I'd be extremely appreciative.

EDIT:
Well I compiled the game with 1076 without any issues. No changes to my code, but I did have to reduce the size of some of the sprite sheets since 1076 on Android can't handle a sheet bigger
than 1024... I'll try with 1089 after the first beta round. I need time to update my collision shapes since Paul fixed the SetCollisionShapeBox command to use offsets like it should.
Sure would love to know what the deal is with 1088...
Cheers!

(/outbound?url=http%3A%2F%2Fwww.naplandgames.com)

Back to top

Profile (/user/f33b897e6d83ad939f5019b43b795ad1)

PM (/pm/new/f33b897e6d83ad939f5019b43b795ad1)

Email (mailto:NaplandGames@gmail.com)

Website (http://www.naplandgames.com)

Posted: 26th Mar 2013 23:06

Link

there is no hardcodedcompilescript in my ide folder

CrashandBurn
Recently Online
Joined: 26th Mar 2013
Location:
Back to top

Profile (/user/820a0b2f72ba075b26913e20daba23fd)

PM (/pm/new/820a0b2f72ba075b26913e20daba23fd)

Posted: 27th Mar 2013 00:05

Link

no problem, just make a BAT file with the contents that are listed in the guide. That's all that's in the HardCodedCompileScript.bat file.

Naphier
Recently Online

(/outbound?url=http%3A%2F%2Fwww.naplandgames.com)

Joined: 2nd Oct 2010


Location: St Petersburg, Florida

Back to top

Profile (/user/f33b897e6d83ad939f5019b43b795ad1)

PM (/pm/new/f33b897e6d83ad939f5019b43b795ad1)

Email (mailto:NaplandGames@gmail.com)

Posted: 27th Mar 2013 22:32

Website (http://www.naplandgames.com)
Link

how do you make a BAT file

CrashandBurn
Recently Online
Joined: 26th Mar 2013
Location:
Back to top

Profile (/user/820a0b2f72ba075b26913e20daba23fd)

PM (/pm/new/820a0b2f72ba075b26913e20daba23fd)

Posted: 28th Mar 2013 02:08

Use any plain text editor and type in the commands. Then save as HardCodedCompileScript.bat in your Android project directory.

Ancient Lady
Recently Online

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Link

Recently Online

AGK Community Tester and AGK Master

Joined: 17th Mar 2004


Location: Anchorage, Alaska,
USA

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 28th Mar 2013 02:10

Link

I get these errors when i open up the AGk player. Do i open up the interpreter android or interpreter android prebuilt? How do i fix these problems?

CrashandBurn

Attachments
Login to view attachments

Recently Online
Joined: 26th Mar 2013
Location:
Back to top

Profile (/user/820a0b2f72ba075b26913e20daba23fd)

PM (/pm/new/820a0b2f72ba075b26913e20daba23fd)

Posted: 28th Mar 2013 02:24

Link

ok i got all the errors off but now i have 35 warnings. It says that all of these classes and variables are never used. the problem are just in one file,called com.android.vending.billing. would it be
ok to just delete the file?

CrashandBurn
Recently Online
Joined: 26th Mar 2013
Location:
Back to top

Profile (/user/820a0b2f72ba075b26913e20daba23fd)

PM (/pm/new/820a0b2f72ba075b26913e20daba23fd)

Posted: 28th Mar 2013 02:26

Link

If they're just yellow warnings and not errors you can just continue on with the steps and you should be fine.

Naphier
Recently Online

(/outbound?url=http%3A%2F%2Fwww.naplandgames.com)

Joined: 2nd Oct 2010


Location: St Petersburg, Florida

Back to top

Profile (/user/f33b897e6d83ad939f5019b43b795ad1)

PM (/pm/new/f33b897e6d83ad939f5019b43b795ad1)

Email (mailto:NaplandGames@gmail.com)

Posted: 28th Mar 2013 13:38

Website (http://www.naplandgames.com)
Link

now i get 2 errors pertaining to the manifest document.:

CrashandBurn
Recently Online
Joined: 26th Mar 2013
Location:

Description Resource Path Location Type


error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize'). AndroidManifest.xml /AGK
Player Prebuilt line 61 Android AAPT Problem
error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize'). AndroidManifest.xml /AGK
Player Prebuilt line 44 Android AAPT Problem

WHAT DO I DO????

Back to top

Profile (/user/820a0b2f72ba075b26913e20daba23fd)

PM (/pm/new/820a0b2f72ba075b26913e20daba23fd)

Posted: 28th Mar 2013 13:41

Link

do i use the android_interpreter or the prebuilt one?

CrashandBurn
Recently Online
Joined: 26th Mar 2013
Location:
Back to top

Profile (/user/820a0b2f72ba075b26913e20daba23fd)

PM (/pm/new/820a0b2f72ba075b26913e20daba23fd)

Posted: 28th Mar 2013 14:13

Link

ok, it now says that AGK/Player/gen already exists but is not a source folder. please convert to a source folder. WHAT DO I DO HELP

CrashandBurn
Recently Online
Joined: 26th Mar 2013
Location:
Back to top

Profile (/user/820a0b2f72ba075b26913e20daba23fd)

PM (/pm/new/820a0b2f72ba075b26913e20daba23fd)

Posted: 28th Mar 2013 15:25

Link

Don't delete the file!

Ancient Lady
Recently Online
Joined: 17th Mar 2004
Location: Anchorage, Alaska,
USA

Back to top

Naphier is correct in that you can ignore yellow warnings, especially ones about unused variables.

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 29th Mar 2013 04:16

I compiled my app in eclipse but when i go and put the APK on my android tablet the app automaticcally crashes. HELP!!!!

Link

CrashandBurn
Recently Online
Joined: 26th Mar 2013
Location:
Back to top

Profile (/user/820a0b2f72ba075b26913e20daba23fd)

PM (/pm/new/820a0b2f72ba075b26913e20daba23fd)

Posted: 29th Mar 2013 04:21

Naphier
Recently Online
Joined: 2nd Oct 2010
Location: St Petersburg, Florida

Link

@ CrashandBurn - just saw your reply to this post about having issues compiling --- not sure why it isn't showing on the forum yet. The forum seems to no be showing posts until a while after
their posted. For me anyway.
At any rate if you can hop on IRC here:
IRC server : irc.freenode.net (port 6667 obviously)
channel to join : #AppGameKit
https://webchat.freenode.net/
I'll see if I can help you out. I was also having issues, but solved them.

(/outbound?url=http%3A%2F%2Fwww.naplandgames.com)

Back to top

Profile (/user/f33b897e6d83ad939f5019b43b795ad1)
Posted: 1st Apr 2013 12:18

PM (/pm/new/f33b897e6d83ad939f5019b43b795ad1)

Email (mailto:NaplandGames@gmail.com)

Edited at: 1st Apr 2013 12:25

Website (http://www.naplandgames.com)
Link

I've followed the instructions as laid out by LiamBradbury and have managed to compile my project with no problems, however when I import/install the .apk file on my phone and run it I get the
AGK player running and not my app.

Bored of the Rings


Recently Online

I am using the current version of AGK and AGK player but also got the same thing happening on previous versions.
Does anyone have any ideas why this is. I have an XPERIA android phone.

Joined: 25th Feb 2005


Location: Middle Earth

Back to top

Profile (/user/76f52dccbc74c9bdd1fc41b7ed3d7bc8)

PM (/pm/new/76f52dccbc74c9bdd1fc41b7ed3d7bc8)

Posted: 1st Apr 2013 15:19

Link

Did you remember to put your byte code file in <androidproj>/assets/media and then rename it exactly 'bytecode.byc'?

Ancient Lady
Recently Online

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Joined: 17th Mar 2004


Location: Anchorage, Alaska,
USA

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Posted: 1st Apr 2013 16:08

Link

@ancient lady - yes I made sure that the file was renamed, I followed instructions to the letter. I will re-check everything and try again.

Bored of the Rings


Recently Online
Joined: 25th Feb 2005
Location: Middle Earth

Back to top

Profile (/user/76f52dccbc74c9bdd1fc41b7ed3d7bc8)

PM (/pm/new/76f52dccbc74c9bdd1fc41b7ed3d7bc8)

Posted: 1st Apr 2013 18:53

Link

Did you uncomment the correct line in interpreter.cpp? There are several for loading the bytecode.byc file, but only one that works for Android.

Ancient Lady
Recently Online

Cheers,
Ancient Lady
AGK Community Tester and AGK Master

Joined: 17th Mar 2004


Location: Anchorage, Alaska,
USA

Back to top

Profile (/user/c958e544a8971074b0db1cfe7886ba1c)

PM (/pm/new/c958e544a8971074b0db1cfe7886ba1c)

Back to top

2 (http://forum.thegamecreators.com/thread/203424?page=2)

3 (http://forum.thegamecreators.com/thread/203424?page=3)

(http://forum.thegamecreators.com/thread/203424?page=2)

Login to post a reply


Server time is: 2016-02-09 09:37:42
Your offset time is: 2016-02-09 09:37:42
Copyright 2016
Acceptable Usage Policy (/aup)

Potrebbero piacerti anche