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
RobInWeert
11
Years of Service
User Offline
Joined: 20th Dec 2012
Location:
Posted: 26th Oct 2013 22:40
Hello. I am using the latest version of AppGameKit, and have updated the Android SDK manager to include Android 3.2 (as well as 2.3.1 and 2.3.3. The SDK Tools is now updated to rev 22.2.1 and everything seems to be up to date in Eclipse.

I am following the step-by-step instructions on the first page of the thread, but I am still have two errors at step 47. Can anyone tell me where I am going wrong?

[img]null[/img]

Attachments

Login to view attachments
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 28th Oct 2013 01:29 Edited at: 28th Oct 2013 01:57
This is a power point slide show going step by step what I did getting v. 19 agk to work.
This goes through the following.
The power point is in 2003 format so it should download.

Changing Manifest File
Changing Java Files
Changing app template file
Changing folders
Change Name and Icons
Exporting code signing android app
ZipAlign

Note: that you have to reload your app in Eclipse to have this work properly.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 7th Nov 2013 04:09
I can't seem to get the Eclipse site to allow me to download the latest file. I went to: http://www.eclipse.org/downloads/ and then clicked on the 32 bit for the Eclipse Standard 4.3.1 version and then clicked the down arrow to download it and it NEVER downloads. Anyone have a clue what is going on? I normally have no issues downloading anything but for some reason this site isn't allowing me to download. I did add the site to my pop-up just in case that was an issue. Still, won't download.
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 7th Nov 2013 12:38
When I hit run in eclipse, I get these two errors:




The word "Gullible" cannot be found in any English Dictionary.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Nov 2013 15:08
bstebbs, that sounds like an issue that has nothing to do with AGK. But is some sort of configuration problem at Eclipse or your machine. What browser are you using? What are your download option settings in the browser?

Flashing Blade, what are you trying to run? And, do you have a device attached that Eclipse is seeing?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 7th Nov 2013 15:40
No it is not AGK. From a bit of googling it seems it's issue with the ADT plugin. But I don't know how to fix it.
I'm trying to work through the steps in the help file and trying to compile the AppGameKit Payer project - "interpreter_android". I am assuming this is some sort of AppGameKit test project. I'm total noob with all this - don't even have a smart phone, borrowing my son's.
My plan was to compile AppGameKit player as per help docs, get it working on my sons phone, build my game an get it working on his phone. All finished by tea-time.
Sorry for the double post, wasn't sure anyone would read on this thread.


The word "Gullible" cannot be found in any English Dictionary.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Nov 2013 16:01
interpreter_android is not a test project. It is the Android Player and the project you copy and edit to create your own Tier 1 Android apk.

Unfortunately, I really don't know how to fix the ADT issues. Not a lot of people check this forum (the AppGameKit Android one). Try posting this issue in the 'AGK Product Chat' forum. Someone there might be able to help.

You can download the Android Player direct from the Google Play Store onto your son's phone (which is a what? with Android version what?).

Then, once you have something working, you can use the online apk building tool to create an apk that can be installed on any Android device and even be published with Google (once you go through all of their steps).

I do check this forum regularly (as you may have noticed) and am usually willing to help anyone.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 7th Nov 2013 17:04
Thanks for your help AL. So what do I do with my game to make an android game. I'm sorry be so stupid, I just thought I could compile a project into and android distributable (is that an apk file?.


The word "Gullible" cannot be found in any English Dictionary.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Nov 2013 17:21
The Android distributable is the apk file.

Assuming you are working in Tier 1, you get the game working in Windows through the AppGameKit IDE first. The IDE is what compiles the byte code file used by the interpreter.

Make sure that any files that you load are spelled exactly the same as you use in the load command. Android is case sensitive and Windows is not. So, if your file is named 'animage.png' and you use 'LoadImage("AnImage.png")', then this will work in Windows but NOT in Android.

Next, once you are happy with your game, you use the online apk builder found here and discussed in this thread to create the apk file.

I have not used this myself, since I work in Tier 2 for my WIP, but others seem to love it.

You will also need to register with Google as a developer and then use their system to publish. I haven't started that process yet. I am in the end stages of getting my levels done for my WIP and then I will do this.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 7th Nov 2013 18:09
Thankyou AL!

Not tried it yet, but that apk builder site looks ace.

Your kindness has been noted and I will treat you favourably when I become the overlord of all mankind


The word "Gullible" cannot be found in any English Dictionary.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Nov 2013 18:26
You are welcome.

But I have already been declared a major goddess elsewhere in this forum. So I think that trumps an overlord.

Happy Programming!

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 8th Nov 2013 02:24
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:

Ok...#44...I don't have the Facebook folder. How do I get that?
And...#46...I don't have the interpreter.cc file. How do I get that?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Nov 2013 04:08
Quote: "Ok...#44...I don't have the Facebook folder. How do I get that?"

This is in the IDE/apps directory, assuming you have a fully purchased version of AGK. If you are using the trial, you do not have the files to do an Android build.

Quote: "And...#46...I don't have the interpreter.cc file. How do I get that? "

The file is actually named "interpreter.cpp". The original post apparently has a typo.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 9th Nov 2013 01:05
"Ok...#44...I don't have the Facebook folder. How do I get that?"
I copied in an older version of AppGameKit so once I copied the latest version, it was there.


"And...#46...I don't have the interpreter.cc file. How do I get that? "
Thanks for pointing out the right file name.
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 9th Nov 2013 02:04
Ok, got to step 73 now. But, I have an error message that states:

"Program has compilation errors"

This might be a loaded question but where do I go to fix them? When I run the app in AppGameKit it runs fine without issues.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Nov 2013 04:38
Where are you seeing this message?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 9th Nov 2013 05:24
I see the message when I am in Eclipse. When I do:

File/Export
Expand Android and select Export Android Application (click Next)
Click Browse and select my application.
Then it displays the message "Project has compilation error(s)"

I need to figure out where to go to compile my app to see what errors I am getting.
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 25th Nov 2013 04:58
Ok, I've abandoned this step by step process since I've not been able to get all the way to the end.

But, now I've used the single click deploy link and have been able to generate my APK file. App works great on my laptop but now I "CANNOT FOR THE LIFE OF ME" get the AppGameKit Viewer to work on my Android Tablet or Android Phone. And, I was able to install the AppGameKit file on my tablet, ran it, and it won't run. What happens is the app comes up, it is in the "install" mode of my game installing all of the files associated with the game (not installing the app as it's already installed), and just before it gets ready to begin, it just goes away. Nothing happens, just disappears as if I never launched it.

Some background:
I have been able to get this same app working on both my tablet and phone. I had uploaded the latest AppGameKit Player on both devices and it's worked great. Was a great way for me to test things. Since then, I have NOT installed a newer AppGameKit software on my laptop nor have updated the AppGameKit Player on my tablet or phone. So, the same software has been installed on all 3 for the past 2 months. The only thing I've done is enhanced my game app. The app runs fine on my laptop but when I use the AppGameKit Player or try to run the installed version on my tablet, the app comes up, the intro starts on the app, and then it just goes away.

Any idea of what is going on here? This is my test application to test how great AppGameKit is, how well I can create a game, compile it, and install it on an Android app. Thus far, I've had nothing but issues. Not what I've been hoping with this software package.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Nov 2013 15:05
If you created an apk with the one click site, you should never see the Player on your device at all. That is an indication that it did not find the bytecode.byc file.

I have not used the one click site, so I don't know all the steps for that.

Try reposting this as a new thread in the AppGameKit Product Chat forum (where a lot more people look) and see if anyone else has had the same issue. (Posting this in this thread is a good way not to get your issue looked at, since it no longer relates to building it yourself.)

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
JHA
20
Years of Service
User Offline
Joined: 30th Dec 2003
Location: Massachusetts, USA
Posted: 19th Dec 2013 16:05 Edited at: 19th Dec 2013 21:43
Okay, I'm back at this now, but still getting errors.

It looks like I don't have the FacebookSDK.Jar file in my facebook folder.

I am using the latest version of AppGameKit from my Products Page:
v108.19 (File Updated: 12th Nov 2013)

I have attached a screenshot of Eclipse showing the errors.

I copied over the IDE folder from my AppGameKit installation and put it here: C:\Android\AGK\IDE

It does have a Facebook folder in the Apps folder, but there is no facebooksdk.jar file in the Bin folder.
C:\Android\AGK\IDE\apps\facebook\bin

I could just download that file and put it there, but will that solve the issue?

I looked through all of the comments and didn't see this exact issue, so sorry if this has been asked before.

Also, my app has nothing to do with Facebook, so why do I have to have that installed anyway?

EDIT: I uninstalled/reinstalled everything and I am now down to just 3 Errors.



After the reinstall, I still don't seem to have the facebooksdk.jar file. Where do I get this?

EDIT 2: AND WE'RE BACK TO THE 106 ERRORS THAT ARE POSTED IN THE ATTACHED IMAGE!!!!!! AAAAAARRRRRRGGGGHHHHH!!!!!!!


I wouldn't even have to do this, if the One Click Build option didn't break. I guess I needed to do this anyway, since I will eventually go over the 50MB limit that it imposes. Why is this so hard?!?!?!

Thank you!
JHA

Attachments

Login to view attachments
mack1604
10
Years of Service
User Offline
Joined: 21st Dec 2013
Location: Fort Myers Beach, FL
Posted: 21st Dec 2013 23:32
I've followed the install and setup instructions step by step and have made it to step #40. I then discovered that I do not have a "the game creators" directory in my Program Files. My question is, what do I do next? Do I need to re-install Cygwin? So, as of now I am at a stand still. Any help would be greatly appreciated. Thanks.
Gorbi
10
Years of Service
User Offline
Joined: 2nd Jan 2014
Location:
Posted: 2nd Jan 2014 01:27
i cna´t find the interpreter.cc.
I have in this .h .cpp .ico .rc .sln and vcproj
What can i do ?
Gorbi
10
Years of Service
User Offline
Joined: 2nd Jan 2014
Location:
Posted: 2nd Jan 2014 06:22
ok i have find it and the programm build a apk file but when i install it on my android phone and run it then opened the android player, what´s wrong ?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jan 2014 15:57
Did you copy the byte code file named <yourproj>.byc from <yourproj>/media to the assets/media folder in the Android project and rename it exactly 'bytecode.byc'?

Are you sure that you uncommented the correct line in interpreter.cpp?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 31st Jan 2014 12:10 Edited at: 31st Jan 2014 13:50
I have no luck with this at all. I'm using AppGameKit 108.19. I could not find android-ndk-r8d-windows.zip so I got android-ndk-r9c-windows-x86.zip instead. Could that be causing my problems? Anyway, see attached screenshot for my problems. I got R8D now, same problems.

Can someone please help me?

Oh, and I couldn't find the file interpreter.cc. in the specified directory. interpreter.cpp had the same lines.

Got JDK 6 installed previously. Gonna try JDK 7, the download is taking forever.

I perhaps should note that I had Eclipse working ages ago.

Attachments

Login to view attachments
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 31st Jan 2014 14:24
I see you have the facebook agkplayer. I too had trouble with this but if you do not need it I would import the android lite player instead.

also did you notice if you have these 3 precompiled files in your directory?

Attachments

Login to view attachments
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 31st Jan 2014 14:44 Edited at: 31st Jan 2014 14:45
I've been running all kinds of updates now. I tried the lite player, I hope I got the correct one. I got those libs but not gcm.jar that you have. I've attached another screenshot.

Attachments

Login to view attachments
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 31st Jan 2014 14:52
I'm now down to only 4 errors. See attached image.

Attachments

Login to view attachments
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 31st Jan 2014 14:56 Edited at: 31st Jan 2014 15:37
Image showing stuff in the explorer.


BTW, Windows will not allow me to copy every file from the interpreter_android folder. It says I need administrator rights but I am using an administrator account in Windows 7. Anyone got any ideas about that?

Attachments

Login to view attachments
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 1st Feb 2014 00:33 Edited at: 1st Feb 2014 00:39
does your facebook sdk.... does it show any errors or is it good?

second you would need to find where its looking for the facebook sdk and fix the broken path.

another...maybe crazy idea would be to copy the facebook files its looking for exactly in that folder path it shows.

also that other file I had gcm.jar did not need to be there...

Im going to try that new app glue file paul has posted. its a different file size then the one I have so it will probably work as its a different one.


Also whenever paul releases an update.... those 3 files that I posted in a screen shot are the only files that need replacing so it should be easy to update next time. However I can only assume that v1 is finished if no one else finds errors with it.


Looks like your doing good however as you are down to one error by the looks of it as the 4 reported are based on the 1 path missing

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 1st Feb 2014 08:27 Edited at: 1st Feb 2014 08:48
FacebookSDK shows errors. I had it not show any errors earlier but after I got everything up to date it started showing errors again.

After creating a gen folder in FacebookSDK I now got 106 errors! 103 instances of "R cannot be resolved to a variable".

Does anybody else have this file? I'm getting an error because it's missing. 'C:\Android\AGK\IDE\apps\facebook\bin\facebooksdk.jar'



See attached image.
As soon as I import FacebookSDK the Console pops up. And when I look at Problems I always have the same 4 errors. And these do not go away when I do the other steps in the guide. I have tried to copy over the IDE folder and import the projects again with no luck. I am using AppGameKit 108.19.

Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 1st Feb 2014 08:47 Edited at: 1st Feb 2014 08:53
Quote: "Does anybody else have this file? I'm getting an error because it's missing. 'C:\Android\AGK\IDE\apps\facebook\bin\facebooksdk.jar'"


Here it is... (see attached zip-file, which still needs unpacking in the \bin\ directory). The file currently isn't installed alongside AppGameKit, so I had to manually download it from this site. FWIW: I still don't have Eclipse running without errors, even with the file.

Attachments

Login to view attachments
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 1st Feb 2014 08:53 Edited at: 1st Feb 2014 09:19
Thanks Zerotown. Mine was named differently, without the '-'. Once I renamed it I got this message when I started up Eclipse, see attached image.

And now I got 54 errors instead.

(Image now attached )

Attachments

Login to view attachments
fhalo
11
Years of Service
User Offline
Joined: 10th Jun 2012
Location:
Posted: 9th Feb 2014 13:30
Hi


Just started using folling method to create apk file.

Started the batch file and get following error:-

jni/../../../common/include/NetworkCommon.h:25:60: fatal error: ../../platform/android/Source/AndroidNetwork.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/android_player/Core.o] Err

Any suggestion
youwuk
10
Years of Service
User Offline
Joined: 14th Feb 2014
Location:
Posted: 14th Feb 2014 19:34
Where is the .byc file from point 62, can't fid it anywhere?

Jsanders
youwuk
10
Years of Service
User Offline
Joined: 14th Feb 2014
Location:
Posted: 14th Feb 2014 19:35
Where is the .byc file from point 62, can't fid it anywhere?

Jsanders
youwuk
10
Years of Service
User Offline
Joined: 14th Feb 2014
Location:
Posted: 14th Feb 2014 19:36
Where is the .byc file from point 62, can't find it anywhere?

Jsanders
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th Feb 2014 19:34
youwuk, I'm guessing you are new to the forum. It takes a while before you new posts are displayed.

The .byc file is in the media directory under your main app directory. It will be named the same as your project.

In the Android setup it gets renamed to 'bytecode.byc' and place in the assets/media directory in the Android project.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 27th Feb 2014 20:27
I do not know what I have managed to do but my APKs are now almost 5 MB smaller than they used to be. Even the AppGameKit Player APK now builds to only 472 kB. These won't run on OUYA any more. I tried to copy over the IDE folder again but still no luck. Anyone got a clue?

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 3rd May 2014 23:41
I just put up my personal guide to deploying for Android on Tier 1.
It's been a long time since the original thread was updated and there are some fairly important updates like how to correctly link the FacebookSDK (which seems to be by far the biggest issue). It also includes instructions on how to make it so that your app will be listed as "designed for tablets".
It is my goal to also provide some sample projects that will have new Facebook SDK, Chartboost Ad integration, Google Play Game services (leaderboards, achievements, and login), and Amazon IAP. I hope to make all of these as modular as possible so that you can pick and choose extra features.

http://naplandgames.com/agk/agk_android_setup.html

I will also attempt to keep this up to date as things change.

Simardgalon
9
Years of Service
User Offline
Joined: 25th Aug 2014
Location:
Posted: 25th Aug 2014 19:14
Thanks Man well done I'm happy

good<a href="http://nicecheat.eu/"> site</a> please check!

Login to post a reply

Server time is: 2024-03-29 11:39:03
Your offset time is: 2024-03-29 11:39:03