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 / Step by Step guide to creating a working .APK file.

Author
Message
LiamBradbury
12
Years of Service
User Offline
Joined: 28th Apr 2011
Location: Manchester, UK
Posted: 6th Feb 2013 14:39 Edited at: 7th Feb 2013 11:18
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.

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 AppGameKit (v108) and make sure you have your AppGameKit 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/

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 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 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 and download the "android-ndk-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 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 AppGameKit 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 AppGameKit 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



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 AppGameKit 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:



delete the "//" at the start to comment this in to the code. click file and then save.

47./ right click the AppGameKit 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 AppGameKit 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 AppGameKit 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:



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 AppGameKit code.


SOME TIPS!:

* make sure you program in your music and sound files on AppGameKit 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
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Feb 2013 15:25
Outstanding LiamBradbury!

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 AppGameKit Master
LiamBradbury
12
Years of Service
User Offline
Joined: 28th Apr 2011
Location: Manchester, UK
Posted: 6th Feb 2013 15:27
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.

www.liambradburymusic.com - professional music for your games at low prices!
LiamBradbury
12
Years of Service
User Offline
Joined: 28th Apr 2011
Location: Manchester, UK
Posted: 6th Feb 2013 15:29
thanks ancient lady! couldn't have done it without your help

www.liambradburymusic.com - professional music for your games at low prices!
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 7th Feb 2013 05:02 Edited at: 26th Mar 2013 06:35
This will definitely be of help to beginners

=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 7th Feb 2013 11:32
Ok, I've been running through this on a couple of my PC's and so far have had the following problems...

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.
"


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 AppGameKit 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.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Feb 2013 15:13
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).

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 AppGameKit Master
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 7th Feb 2013 18:06
Ok, I have successfully managed to get this to work.

Thank you LiamBradbury and Ancient Lady

risecreature
11
Years of Service
User Offline
Joined: 10th Oct 2012
Location:
Posted: 9th Feb 2013 09:48
After step 47 I've got next errors in eclipse:

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
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Feb 2013 17:18
In the project.properties for your project does it have these line:


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:


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 AppGameKit Master
risecreature
11
Years of Service
User Offline
Joined: 10th Oct 2012
Location:
Posted: 9th Feb 2013 20:03
Version of AppGameKit 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 AppGameKit 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).
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Feb 2013 22:44
Can I assume that you are trying to compile AGK/IDE/apps/interpreter_android?

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 AppGameKit Master
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 12th Feb 2013 16:55
I just used the guide to set up an Android v1088 Tier 1 test app and it definitely helped.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
TrezSoft
AGK Tool Maker
11
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 12th Feb 2013 23:41
Maybe someone can clarify point 54 for me

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!
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 13th Feb 2013 01:30
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

There are 10 types of people, those who understand binary and those who don't
TrezSoft
AGK Tool Maker
11
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 13th Feb 2013 10:05
@MissJojo: The question is which way is correct ! i can get it to work with both methods.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Feb 2013 15:39
I was given the instructions to change only three of the instances to my own name by the AppGameKit Developer Paul.

Only the ones mentioned in the instructions on the AGK Wiki Templates 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 AppGameKit Master
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 14th Feb 2013 14:29
I changed all instances with no issues.

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]
Talairina
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: United Kingdom
Posted: 24th Feb 2013 04:17
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.
Snaggletooth
14
Years of Service
User Offline
Joined: 2nd Feb 2010
Location:
Posted: 24th Feb 2013 18:59
i am stuck on step 40 - i have no AppGameKit nor IDE folder anywhere in my The Games Creator folder
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Feb 2013 16:48
When you installed your AppGameKit, where did you put it? That is the directory to look for.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Mar 2013 15:00
Quote: "In the project.properties for your project does it have these line:

+ 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.

BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Mar 2013 23:04
I've had to make a change to your process, in 1076 which might be why?


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"


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

wargasmic
17
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 11th Mar 2013 15:44
Is there a detailed guide like this for tier 2?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Mar 2013 16:14
Tier 2 is similar.

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 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 AppGameKit 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 AppGameKit 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 AppGameKit Master
EricW
11
Years of Service
User Offline
Joined: 17th Jan 2013
Location:
Posted: 20th Mar 2013 10:13
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
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Mar 2013 21:35
I assume that you completely exited Eclipse. Is that correct?

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

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
EricW
11
Years of Service
User Offline
Joined: 17th Jan 2013
Location:
Posted: 21st Mar 2013 07:19
Yes, I restarted Eclipse after it restarted itself with the same result, also I tried importing interpreter_android which gives me the AppGameKit 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
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 21st Mar 2013 15:21
Were you very careful to read and follow and verify all the steps (as appropriate) under ANDROID SDK (steps 8-14)?

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 AppGameKit Master
EricW
11
Years of Service
User Offline
Joined: 17th Jan 2013
Location:
Posted: 23rd Mar 2013 10:28
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.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Mar 2013 16:27
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.

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

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
EricW
11
Years of Service
User Offline
Joined: 17th Jan 2013
Location:
Posted: 24th Mar 2013 03:36
Thanks for trying to help, if I solve it I will post the solution, I'll dig a little deeper and also install AppGameKit on another computer, assuming all goes well I can compare the installations.
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 24th Mar 2013 21:55 Edited at: 25th Mar 2013 20:52
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...

At any rate, I've successfully compiled the player and I tested it out with broadcasting my game from the AppGameKit IDE. It worked fine.

I'm a little confused on whether I should remove the AppGameKit 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!

CrashandBurn
11
Years of Service
User Offline
Joined: 26th Mar 2013
Location:
Posted: 26th Mar 2013 23:06
there is no hardcodedcompilescript in my ide folder
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 27th Mar 2013 00:05
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.

CrashandBurn
11
Years of Service
User Offline
Joined: 26th Mar 2013
Location:
Posted: 27th Mar 2013 22:32
how do you make a BAT file
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
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.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
CrashandBurn
11
Years of Service
User Offline
Joined: 26th Mar 2013
Location:
Posted: 28th Mar 2013 02:10
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?

Attachments

Login to view attachments
CrashandBurn
11
Years of Service
User Offline
Joined: 26th Mar 2013
Location:
Posted: 28th Mar 2013 02:24
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?
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 28th Mar 2013 02:26
If they're just yellow warnings and not errors you can just continue on with the steps and you should be fine.

CrashandBurn
11
Years of Service
User Offline
Joined: 26th Mar 2013
Location:
Posted: 28th Mar 2013 13:38
now i get 2 errors pertaining to the manifest document.:

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????
CrashandBurn
11
Years of Service
User Offline
Joined: 26th Mar 2013
Location:
Posted: 28th Mar 2013 13:41
do i use the android_interpreter or the prebuilt one?
CrashandBurn
11
Years of Service
User Offline
Joined: 26th Mar 2013
Location:
Posted: 28th Mar 2013 14:13
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
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Mar 2013 15:25
Don't delete the file!

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

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
CrashandBurn
11
Years of Service
User Offline
Joined: 26th Mar 2013
Location:
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!!!!
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 29th Mar 2013 04:21
@ 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.

Bored of the Rings
User Banned
Posted: 1st Apr 2013 13:18 Edited at: 1st Apr 2013 13:25
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 AppGameKit player running and not my app.

I am using the current version of AppGameKit and AppGameKit 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.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Apr 2013 16:19
Did you remember to put your byte code file in <androidproj>/assets/media and then rename it exactly 'bytecode.byc'?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Bored of the Rings
User Banned
Posted: 1st Apr 2013 17:08
@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.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Apr 2013 19:53
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.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-03-29 13:47:11
Your offset time is: 2024-03-29 13:47:11