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
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 1st Apr 2013 22:09
@Bored. I had similar issues with these instructions when using the 1088 build. I went over to 1076 and everything worked fine. I also went to 1089 using the android prebuilt interpreter and everything worked fine (plus there were a lot less things to change).
I try to be on the IRC channel as often as possible to help troubleshoot issues, so if you hop over there you might see me. If not you can always email me and ask when I might be around.

I wish more people would use the IRC channel, that way we could actually figure out these issues then post our findings here vs. trying to troubleshoot a complicated process post by post. And everyone can benefit from seeing actual results.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Apr 2013 15:25
Quote: "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"


This would be caused by compiling with a version of the Android SDK prior to 3.2 (API 13)

Quote: "now says that AGK/Player/gen already exists but is not a source folder. please convert to a source folder"


That one I've never seen before, but looks like something got messed up somewhere as the gen folder contains files generated automatically during compile, try cleaning and rebuilding the project.
Bored of the Rings
User Banned
Posted: 6th Apr 2013 12:39
I have now fixed the issue I had previously as mentioned above. I used the prebuilt interpreter and changed all occurrences of com.mycompany.myapp etc and my app now runs (although I get undesired effects).
CrashandBurn
11
Years of Service
User Offline
Joined: 26th Mar 2013
Location:
Posted: 7th Apr 2013 01:58
i have made my APK file but when i put it on my android tablet it just crashes. What am i doing wrong?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Apr 2013 17:47
What version of AppGameKit are you working with? They just put v10810 on the 'My Products' page. It might work better?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 8th Apr 2013 13:25 Edited at: 8th Apr 2013 13:26
Quote: "i have made my APK file but when i put it on my android tablet it just crashes. What am i doing wrong?"


Does the screen go black i.e your game never shows, and after a while it crashes?

My hovercraft is full of eels
bleakie
11
Years of Service
User Offline
Joined: 21st Apr 2013
Location:
Posted: 21st Apr 2013 14:02
I encountered the same problem as EricW with step 24 where I could not find Android in the left panel of preferences. I have found the solution was to uninstall the ADT plugin then exit eclipse, then when run eclipse as administrator before re-installing the ADT plugin.
To run as administrator navigate to your eclipse .exe file and right click then choose 'Run as Administrator' then proceed from step 17.

To uninstall a plugin open eclipse, then go to Help -> About Eclipse SDK -> Installation Preferences -> select 'Android Development Tools' then click uninstall at the bottom of the window.

Hope this helps.
DazzyF
12
Years of Service
User Offline
Joined: 13th May 2012
Location:
Posted: 27th Apr 2013 15:42
Even following the steps, on the video that's on you tube, my system hasn't managed to succesfully compile an android app, only the AppGameKit player. I am so frustrated, will have to try on my winXP machine, as maybe it's because of Vista, I don't know, but there's so much you need to do. Hopefully an integrated android (and if poss iOS) compiler will be the way forward with AGK. It's what brings the program down at the moment.

http://www.yorkshirereflections.com
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 27th Apr 2013 16:44
If you're using AGk 10811 there is a rebuilt android interpreter that makes it so you don't need cygwin. That helps a little.
If you want I can help you out if you come to the IRC channel, but not until tomorrow.
Just send me an email and we can work out the time.
Once you get through this once every other time is very easy.

www.NaplandGames.com
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Apr 2013 18:34
DazzyF, did you make sure to uncomment the correct line of code in the interpreter.cpp file?

And did you rename your app byte code file exactly 'bytecode.byc' (without the quotes) and is it in the <andproj>/media directory?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 24th May 2013 21:36 Edited at: 24th May 2013 21:42
Well some update has completely messed up Eclipse for me. I was trying to get 10812 to work and updated to the google API10 and it broke everything.
So I uninstalled Eclipse, uninstalled all of the Android SDK packages and started over. I now get an error in MyFaceBookActivity.java at line 41 that reads:
Quote: "The project was not built since its build path is incomplete. Cannot find the class file for android.support.v4.app.Fragment. Fix the build path then try building this project"

And
Quote: "The type android.support.v4.app.Fragment cannot be resolved. It is indirectly referenced from required .class files"


I've tried everything here:
http://stackoverflow.com/questions/16056914/jar-mismatch-fix-your-dependencies
with no success

Any clues?


EDIT:
If this is of any help -- I commented out line 41 in MyFacebookActivity.java


Unfortunately I imagine that this will destroy any Facebook functionality...

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th May 2013 22:10
This may be a couple of dumb questions...

Did you put back the facebook project in your work area (near your app)?

And did you import that into Eclipse BEFORE you imported your project?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 24th May 2013 22:28 Edited at: 25th May 2013 01:13
Originally I had not imported the Facebook SDK into Eclipse first, but unfortunately that appears to make no difference.


Quote: "Did you put back the facebook project in your work area (near your app)?"

Not sure what you mean by this. If you mean are they in the same directory. Yes I simply have a copy of the IDE folder that I build from.

More questions. I was really meaning to test my chat client this weekend on a few devices, but this kills it. I wish I never tried 10812!

EDIT:
OK so I made some progress, but not much.
I;ve tinkered so much I'm not sur what actually fixed it, but I went through and made sure that the project.properties had the target to 13 and same in the manifest.
Although I can now compile with no errors the app simply crashes on the Android device.
I'm going to retry with another project.


Retrying with another project I get that same initial error about android.support.v4.app.Fragment missing...
If I add the library as an external library to the app's package then the error goes away, but the app still crashes. Durnit!

EDIT 2:
Got it to work. I had to remove the android-support-v4.jar from both the app and the FacebookSDK package every place I could find and then add them back in as an external library to both packages. Fun times.


EDIT 3:
Now I can install the app directly from Eclipse to a device using ADM, but I can't export to an APK file. I keep getting a "Conversion to Davlik format fail with error 1" message. I've tried about a dozen things I've found on stackoverflow, but no success. Also the app behaves really poorly when installed from Eclipse via ADM. SO something is very very wrong!

Alfred
18
Years of Service
User Offline
Joined: 22nd Jun 2006
Location: Jalisco, Mexico
Posted: 28th May 2013 05:25
Quote: "Retrying with another project I get that same initial error about android.support.v4.app.Fragment missing...
If I add the library as an external library to the app's package then the error goes away, but the app still crashes. Durnit!"


This is true. After a while of tinkering with the files and following Ancient Lady´s tutorial I have the same problem. If I comment out in MyFacebookActivity.java:



then it compiles and I can export an .apk, but the app crashes a few seconds after opening. (I know the bytecode and media are ok, because my app loads correctly and starts a few seconds of animation before exiting unexpectedly.) This never happens with the player broadcasting the app. I'm using AppGameKit 108Beta12.

Hallowed are the ori.
Grook
AGK Backer
12
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: Lancashire, England
Posted: 28th May 2013 11:45
I get almost exactly the same as Naphier and Alfred. I've followed the instructions to the letter half a dozen times, uninstalling and reinstalling everything each time. Very frustrating

When can we expect one-click compile to APK? I'm close to giving up entirely; I love AppGameKit but it's a hobby for me and I don't really have the time (or inclination) to learn what I need to about eclipse, Java, cygwin etc. to make this fun again.

"Happiness is contrary to the human condition" --White (to Black)
DBer
17
Years of Service
User Offline
Joined: 16th Mar 2007
Location:
Posted: 28th May 2013 14:15
When compiling the AGK-player, it gave me the following error:



I could resolve this by typing target=android-13 instead of target=android-9 in the project.properties file.

I installed android 3.2 and 2.3.3 because version 2.3.1 was not available in android sdk manager.

Maybe this helps somebody. Or did I do something useless?

Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 28th May 2013 16:10
@Alfred - I had to import android.support.v4.JAR to my app's package in the package explorer on Eclipse to get it to work. Don't comment out that line otherwise it breaks (as you've experienced).
To import android.support.v4.JAR as an external library -- right click your app's package name in the package explorer, select Build Path and then Configure Build path. If that package shows anywhere in the list of libraries or in any branches of the libraries then delete it!
Finally click Add External JARs then navigate to the Facebook/libs directory and select android.support.v4.JAR
Then OK
That should fix it up, but as DBer noticed, you might have to change your target to android-13 which is API 3.2. You might also want to change this in the manifest file... but it looks like I didn't in my last project.

My last project compiled OK and after much fighting with Eclipse I was able to export it. BUT it doesn't behave well. The first run often crashes or doesn't show text in text boxes, subsequent runs have random crashes. I'm starting to think there is something wrong with the interpreter files we go thin this package, either that or all of the tinkering I did has done something wrong.

Alfred
18
Years of Service
User Offline
Joined: 22nd Jun 2006
Location: Jalisco, Mexico
Posted: 28th May 2013 18:16 Edited at: 28th May 2013 18:17
@Naphier - Importing the way you suggested fixed up the android support issues correctly without commenting out anything. However, the exported app still crashes after only a few seconds every time I open it. I checked and the target was already android 13 in my project.properties file. I tried with the interpreter prebuilt project in a clean workspace and exported an apk following instructions here by the letter, but the app crashes randomly.

When using the player with the broadcast there are no crashes. Is there any difference in error handling for the exported apk with built in bytecode, vs the player app loading it from the broadcast?

Hallowed are the ori.
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 28th May 2013 18:26
@Alfred - There is probably different error handling - I get some glitches too, random crashes, text not showing in edit boxes, hangups, etc. Check your app's data directory and see if you have an error log in the media folder. I don't see one generated for my apps, so it is probably turned off somewhere.

In the AppGameKit 10812 release announcement thread I have asked Paul if he can go over the interpreter files with a fine tooth comb or check the process we're using to get it to work.

Something is not 100% correct here.

Alfred
18
Years of Service
User Offline
Joined: 22nd Jun 2006
Location: Jalisco, Mexico
Posted: 29th May 2013 17:22 Edited at: 29th May 2013 17:42
@Naphier - I looked up the error logs and I get the following:



This command coincides perfectly with the moment the app crashes. I'll try to get a bytecode without this command and see if it runs correctly. I see no reason why the player would accept the token and the prebuilt interpreter app not.. but hopefully I can get to the bottom of the problem.

Thanks for asking Paul, I would be willing to send the offending bytecode/apk or any needed files if it helps. In all likelyhood its some defective programming on my part, but the player cruises smoothly through the whole app without a hitch.

Hallowed are the ori.
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 29th May 2013 18:07
That's really odd. I would check the line before and after that. I just tested my app which also uses this command and it works as expected.

Also in my test today I had to delete all of the references to the FacebookSDK as I couldn't get Eclipse to properly link the two packages. It kept telling me that the import com.facebook lines were incorrect. Very annoying!

Alfred
18
Years of Service
User Offline
Joined: 22nd Jun 2006
Location: Jalisco, Mexico
Posted: 30th May 2013 23:14 Edited at: 30th May 2013 23:17
@Naphier - Indeed very odd behaviour, but I found a fix. I have finally managed to get past the crashes and unexpected errors.

I switched over to a 32 bit windows pc and did the whole process again. The .apk works flawlessly. I did the WHOLE thing again with another 64 bit PC to prove my theory and bam.. the bytecode that is produced crashes even with the player randomly. So this definitely has something to do with the interpreter files and x86/x64 compatibility. Hopefully this wasn't already posted elsewhere, as I was starting to get frustrated with the the apk production process.

Although what I do find stressing is that on each computer the process of getting eclipse to compile the facebook project and get it recognized in the interpreter project seem to be different. Now back to programming. Yay!! Thanks Naphier!

Hallowed are the ori.
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 30th May 2013 23:17
Glad you got it to work. I seem to get different results every time I set up a project in Eclipse. Very goofy.
Wishing for one-click deployment!

Alfred
18
Years of Service
User Offline
Joined: 22nd Jun 2006
Location: Jalisco, Mexico
Posted: 31st May 2013 00:35
Yup, a one click script that deploys everything would be fantastic. And then all we would have to do is sign it.

Hallowed are the ori.
qwedsa
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location:
Posted: 14th Jun 2013 05:46
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:

i see interpreter.cpp, interpreter.rc, but no interpreter.cc ???
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 14th Jun 2013 05:48
Interpreter.CPP is the one you're looking for.

qwedsa
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location:
Posted: 14th Jun 2013 07:32
it's saying "Unable to resolve target 'android-13'"
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 14th Jun 2013 15:46
You may need to update your Android SDKs like this:
1. Open Eclipse
2. Open the "Android SDK Manager" by clicking on 'Window' in the tool bar and then "Android SDK Manager" in its drop-down menu
3. Make sure that Android 3.2 (API 13) is installed, and it probably isn't given the error you are getting
4. Check 'Android 3.2 (API 13)' to indicate that it should be installed
5. Click on 'Install Packages' (lower right of dialog)
6. Accept licenses as requested
7. Wait for installation to finish
8. Close Android SDK Manager (probably by clicking on red close box in upper right)
9. Restart Eclipse

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 22nd Jun 2013 13:28
Can someone please God automate this process (as with Freedom Engine)?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 22nd Jun 2013 17:07
Check the stickied post on the main agk board
hello to everybody
11
Years of Service
User Offline
Joined: 21st Jun 2013
Location:
Posted: 25th Jun 2013 20:11
Is there a in-depth guide like this for tier 3?

Keep smiling.
jlahtinen
15
Years of Service
User Offline
Joined: 26th Oct 2009
Location: Finland
Posted: 1st Jul 2013 15:33
Eclipse classic is this? http://www.eclipse.org/downloads/moreinfo/classic.php

(the link in the first post shows only Eclipse Standard?)



With installer_r17-windows.exe, there is no "Android 2.3.1" box, and also the "Android 3.2" boxes, when clicking obsolete. With r21 there is.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Jul 2013 16:07
I would then suggest using r21. You need to be able to include Android 2.3.3 (this was updated by TGC but the original post has not been updated) and Android 3.2 for compatibility with those devices.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
jlahtinen
15
Years of Service
User Offline
Joined: 26th Oct 2009
Location: Finland
Posted: 1st Jul 2013 16:12
Yeah, it was just a headsup, if someone else had the same issues.
haliop
User Banned
Posted: 18th Aug 2013 18:53
i got no clue what im doing wrong i get these errors :

when trying to build the player in eclipse
at 48 :....




Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 19th Aug 2013 03:37
Which project did you import into Eclipse first?

What version of AppGameKit are you working with?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
cool guy
11
Years of Service
User Offline
Joined: 1st Sep 2013
Location:
Posted: 1st Sep 2013 13:18
I need your help.
Its about step 40 wher i navagate to C:/program files/AGK but in my pc there is no folder like this.
please tell me where i can do wrong. plz help me... plz
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 1st Sep 2013 20:09
@Cool Guy:
First, there's a n00b filter in place where you have to wait for your posts to be approved before they show up. Multiple posts are generally frowned upon.

Secondly, Do you have a 64bit operating system? If so, they may be in c:\Program Files (x86)

Failing that, it'll be where ever your AppGameKit is installed. The easiest way to find this out would be to see where the properties of the AppGameKit shortcut say it is.

Hope that helps.

cool guy
11
Years of Service
User Offline
Joined: 1st Sep 2013
Location:
Posted: 2nd Sep 2013 11:25
@=PRoF=
ok ok
sorry but i was thinking my message was not posted n for that reason i was posted again.
sorry

i got ur solution.
but where is the AppGameKit installed
in all steps where is saying that install AGK. So i not install AGK
how to install it..???
cool guy
11
Years of Service
User Offline
Joined: 1st Sep 2013
Location:
Posted: 2nd Sep 2013 11:27
@=PRoF=
and my operating system is windows 7 32 bit
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Sep 2013 16:37
cool guy, if you installed AppGameKit, there should be an icon for it somewhere on your desktop. If you right click on the icon and select 'properties', in the 'Start in' field, it will show the directory you are installed in.

If you haven't already installed AppGameKit (your comment is confusing), download it from your The Game Creators account (the 'My Products' link after you log in). When you install it, it gives you the opportunity to select the directory to install it in. And it should show the location that is the default. Personally, I install mine in a path like C:\TGC\AGK<version number>. This is a nice short path to work with. You can install multiple versions this way as well (I do it for testing purposes).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
cool guy
11
Years of Service
User Offline
Joined: 1st Sep 2013
Location:
Posted: 4th Sep 2013 14:49
@ancient lady
thanks for this lovely and helpful reply.
i have installed App Game Kit from torrent for free.
and now i am on step 41
now there is no folder like "C:/Android/AGK/IDE/apps/interpreter_android" then what can i do. please help me.
plz see in this image.

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 4th Sep 2013 16:29
Quote: "i have installed App Game Kit from torrent for free."

This doesn't sound right. In fact, it looks like it might even be illegal if it is the full version (which is not a free product). The only free version of AppGameKit is the trial one from the TGC site.

If you actually have the Trial version, it does not come with the things needed to build anything other than Windows apps.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
cool guy
11
Years of Service
User Offline
Joined: 1st Sep 2013
Location:
Posted: 5th Sep 2013 15:51
@ancient lady
then now what can i do....
i have no money to but AGK
then what can i do now....
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 5th Sep 2013 16:06
@cool guy
You can get a job and stop asking for help from people who have paid money for it. It takes a lot of nerve to steal something and then come back to the store where you stole it to ask for help. I mean for crying out loud it is only $60!

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Sep 2013 16:15
Naphier, I think he may be working with the Trial version (his posted image indicates that it only has the Windows setup).

cool guy, there isn't anything we can do to help. Without the full version, you cannot build for other platforms. It's that simple.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Sep 2013 16:30 Edited at: 5th Sep 2013 16:41
@cool guy, if you are using the free version (as I suspect) you will not be able to use AppGameKit to create an apk. When you purchase the full version this will be possible. I suggest you download the latest trial version from the OFFICIAL DOWNLOAD in future to avoid any confusion.

I will be checking with TGC whether you have downloaded a valid trial/full version, if we can find no evidence of this your account may be suspended or banned.

The free version is easily downloaded from the TGC site and piracy is not tolerated. Please read the AUP.

"Everything should be made as simple as possible, but not simpler."
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 5th Sep 2013 16:59
I have banned Cool Guy until November. He does not own a full and legal copy of AGK.

Rick

Financial Director
TGC Team
KeithC
Senior Moderator
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location: Michigan
Posted: 5th Sep 2013 18:52
I approved his post, and wanted others input before banning him; as I don't peruse this section much. Looks like it would have been justified.

-Keith

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Sep 2013 19:03
It's entirely possible that he is using the Trial version and not a pirated Full version.

If you google "Torrent App Game Kit" you come up with some sketchy looking sites. I did NOT try downloading from any of them to see if it was a full version or the trial version.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-23 23:12:54
Your offset time is: 2024-11-23 23:12:54