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 / Difficulties following the Android Compiler guide

Author
Message
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 30th Nov 2011 00:56
I have had a go today at setting up my system to try to compile apps for android. I have been avoiding looking at this side of AppGameKit as the guides look quite long and seem to require a whole plethora of programs I have no experience in how to use.
So I have got to the part about cygwin. That is where all progress has ended. the guide breaks down somewhat at this point for me. No matter what I type in at the command prompt all I get is a "directory or file doesn't exist" error. typing in "ls" or "dir" brings up diddly squat.
I have tried "cd /cygdrive/c/android_SDK/AGK/IDE/apps/interpreter_android" and various other paths to no avail. Looking at a thread on this forum confused me further as they used "C\Android_SDK\IDE\templates\template_android", which is a different path entirely.
Could I have gone wrong in the initial setup of the program? At the minute I feel like uninstalling everything and starting over (sort of lol). It seems odd I cannot get anything to list when I type dir or ls.

MrValentine
AGK Backer
9
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 30th Nov 2011 03:22
Is it is or Ls...

I have not seen the documentation yet...

bjadams
AGK Backer
12
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 30th Nov 2011 07:33
Check this out:

http://mobilepearls.com/labs/ndk-builder-in-eclipse/

and get rid of cygwin!
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 30th Nov 2011 20:17
That looks better, a gui to use there at least. I was wondering when I would have to use eclipse, the tut gets you to install it but not much else. So I can avoid using cygwin? I don't see why they put it in the guide if you don't really need it. Am I supposed to use this guide to point to the android template instead? I'm already regretting trying this now lol.

Paul Johnston
TGC Developer
17
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Dec 2011 23:20
In verion 6 of the NDK cygwin was required, although I think version 7 has introduced a Windows version of the script which in theory you could add to the eclipse build process. I've not tried it.

In cygwin have you tried browsing through the directories one at a time, e.g. "cd /cygdrive" then type LS to see where to go next, then "cd c", "cd android_SDK", etc. Directories in cygwin are case sensitive.
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 3rd Dec 2011 01:31
I have got a little further and managed to get the cygwin part done. Phew! Command prompts can be awkward things sometimes! I think it must have been the "cd /cygdrive that might have been causing me issues in the main, I probably missed the / by mistake. Anyway I seem to be stuck again in Eclipse. I have imported the project into Eclipse but have 3 errors, which seem to be beyond the fix properties option. A mistake on my part obviously. I get these errors.

Project AGKplayer is missing required source folder gen
The project cannot be built until build errors are resolved
Unable to resolve target android-9

I can see that this means I have missing files somehow. I copied the entire IDE folder of AppGameKit across, so I am not sure where I went wrong. Any ideas?

Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Dec 2011 09:24 Edited at: 3rd Dec 2011 09:25
Quote: "Project AGKplayer is missing required source folder gen"

Create a gen folder, then refresh, fix android project, then clean.

Quote: "Unable to resolve target android-9"

Install SDK Platform Android 2.3 from within eclipse.

It's exactly the same issues I'm getting, but I can't download from the google repository whilst at work so it's where I've stopped. If you manage to resolve this issue, for the love of [insert appropriate deity here] please tell me how! lol

My signature is NOT a moderator plaything! Stop changing it!
Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Dec 2011 12:57
I fixed it!!!!!

I installed android 2.3 by installing new software from within eclipse, and after a hella-long time of working it out, finally have it working! Just a shame the template doesn't actually do anything! lol

Now to plug in my bytecode and assets and get my own games working!!!

My signature is NOT a moderator plaything! Stop changing it!
Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Dec 2011 14:36 Edited at: 3rd Dec 2011 16:33
Now I have a new problem. I think I have the folder structure all wrong as when compiling in cygwin the log file is full of errors... (Plus the documentation, whilst not very clear, mentions things which don't tally up with how I have things.)

What is the folder structure supposed to be. I have it like this...

Is this right?



No way was I going to triple post! lol

Righto, I've figured out that the assets folder, should be the media folder, and I can send my game to the virtual android device.

But now, I get errors on the device saying: "The application AppGameKit Player (process com.teamdefiant.TheMobileGame) has stopped unexpectedly. Please try again"

I have no idea why, but LogCat says the following:


Help still needed, but on a different topic now! lol
Also, why does the icon on the phone say AppGameKit Player, I followed the instructions and changed it. Have I missed somewhere?

Yet another edit, I've got the game called the right thing and has the right icon. It just won't run.

My signature is NOT a moderator plaything! Stop changing it!
b83
8
Years of Service
User Offline
Joined: 30th Nov 2011
Location:
Posted: 3rd Dec 2011 18:31 Edited at: 3rd Dec 2011 19:08
*figured out the problem*

Renaming awk.exe to anything other than awk.exe has fixed the problem.

Hey guys, don't really want to start a new thread for this because I think I will get the appropriate help in this one, hopefully

I am trying to follow the android guide for tier 2 builds, but keep running into this error. I have set environment variables within windows and within the cygwin terminal but nothing seems to work.

$ ndk-build 2> log.txt
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !


any ideas how to set HOST_AWK to gawk? did I completely miss doing something? I made sure gawk is installed from the cygwin setup also.

Thanks in advance
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 4th Dec 2011 02:50
I have made an apk file now, thanks Mobiius for those pointers. I haven't managed to test if it has actually worked though as it doesn't seem to run in the emulator. I also cannot for the life of me figure out how to transfer the apk file it has made to an emulation using VM. I should have configured the virtual drive differently I suppose. So I guess I will wait till I get chance on the real thing hopefully it may transfer using USB or something. I may reinstall it again with the emulator and change the drive type so hopefully I can drag in from windows.

Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Dec 2011 10:21 Edited at: 4th Dec 2011 10:33
When you run the virtual android device, it automatically transfers the apk file across. If you have a physical device, it'll transfer it across to that too. It just takes a long time, ans the virtual device takes about 5 minutes to start up, then about another 2/3 minutes to transfer and install the apk file.

Then it'll just fail anyway. (At least it does for me. I'm hoping it'll work an a real device so that's my next step.)

*edit* Doesn't work on a physical device either.

I have no idea how to resolve this issue.

Does any Android or AppGameKit guru's out there have any idea how to fix this?

My signature is NOT a moderator plaything! Stop changing it!
Impetus73
9
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 4th Dec 2011 11:05
I never got any virtual phone, or auto transfer, I just exported the project as an .APK, then manually copyed the file to a physical device, and clicked it to install it.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Dec 2011 11:22
Exporting is the final process, you can just click run and it's copied automatically.

My signature is NOT a moderator plaything! Stop changing it!
Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Dec 2011 13:05
I have finally played my game on my device!!!

Only thing is, the screen should be forced landscape, but is displayed portrait, whilst the phone is held landscape.

I'll have another fiddle about with things and see if I can sort it.


But YAY! The game's on the device!!!

My signature is NOT a moderator plaything! Stop changing it!
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 4th Dec 2011 20:18
Congrats Mobiius, I'm still at am impasse. I left the virtualization running for ages, all it did was sit doing nothing for ages. I figured it hadn't worked. So I set up a different virtualization using virtualbox, but I have no way of getting the apk file to it. I tried downloading a FTP program for it but it couldn't connect (on the virtual phone). I will probably wipe that install later and reinstall using a more compatible virtual drive. If I'm lucky my Bro may pop round, and I can test on a real device

Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Dec 2011 20:26
Have you log LogCat installed? Some times I'd run it but it wouldn't appear on the virtual device as XXX.apk was not found. Just make sure you right click on the project, then click on Android Tools > Fix Android Properties. Then clean the project, then run.

It took me ages to figure it out, but once I had, wow was it easy! I've already got 3 apps uploaded to the android market and one of them is already live!

My signature is NOT a moderator plaything! Stop changing it!
Paul Johnston
TGC Developer
17
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Dec 2011 22:47
Quote: "Only thing is, the screen should be forced landscape, but is displayed portrait, whilst the phone is held landscape."


In AndroidManifest.xml set android:screenOrientation to "landscape" to use the OS orientation, and use SetOrientationAllowed( 1,0,0,0 ) to turn off AppGameKit orientation changes.
Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Dec 2011 11:51
It's ok, I sorted it by not including the SetScreenAspect command. (Was only really needed for PC where the window can be maximised and restored)

My signature is NOT a moderator plaything! Stop changing it!
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 5th Dec 2011 20:23 Edited at: 5th Dec 2011 20:33
Ok managed to test it out on an android phone today (well someone else has, I just sent them the file). No luck, it has some acceleron setup screen, and sits at the agk player apparently. I have no idea what I have done wrong now, it seems to be ignoring the game entirely. I think I edited all the files correctly, but obviously something is wrong.
I am unsure what LogCat is? Is this on the PC or phone? I am afraid I am one of those rare people who do not use mobile phones ever and have next to no knowledge of them. It took me a while to realize I had to drag the power button across for starters(on the emulator), rather than clicking it!
Frustration seems too inadequate a word for this process at the moment

Edit would there be any file I could post that might help with seeing where I have gone wrong?

nz0
AGK Developer
13
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Dec 2011 02:15
@DVader - I had the same problem.

After some messing around it's become quite straightforward for me now.

Some gotchas:
have you edited the interpreter.cpp file that copies your bytecode.byc? You also need to rename your [project].byc in the assets folder, or your bytecode isn't used.

Following the guide does work for me - copying the "interpreter_android" folder as [your app name] is important, then fill up the assets in there.

Watch out for case sensitivity!!

Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 7th Dec 2011 16:30
Make sure you compiled the interpreter, and not the player as well!

My signature is NOT a moderator plaything! Stop changing it!
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 7th Dec 2011 21:01 Edited at: 7th Dec 2011 21:55
I think I edited the interpreter file. I changed it to the name of my app I think. I don't think I changed the name of my app to bytecode though, as I thought it would use the settings to look for my game name. I'll have another look and try again. I have pretty much given up trying the last few days and gone back to playing with AppGameKit itself (much more fun).
If it is as simple as changing the game name to bytecode hopefully I might have more success. I assume I will have to recompile using cygwin again also.
Had a look, I did rename the bytecode is the right name, so I had renamed that. I have remmed in the wrong line in the interpreter file by the looks, so that could be the cause. After recompiling in cygwin and running via eclipse I still have nothing doing in the emulator. It just sits at the initial android boot screen. is it supposed to run on this? The guide says it won't but I have heard here it does..
Ok sent it to be tested and same problem. I'm not sure about what I am compiling(player/interpreter), as I am following the guides folder structure in cygwin when compiling.
Eg. "cd /cygdrive/c/android/IDE/apps/RunningMen"
and
"/cygdrive/c/android/android-ndk-r7/ndk-build 2> log.txt"
Then I load eclipse and run the new project. I tried fixing the projects properties and cleaning beforehand, although it looked ok anyway (no ! at the side). I know it must be something silly but it is driving me nuts now lol! Could it simply be because I only copied the IDE folder rather than the entire AppGameKit folder across?

LeeBamber
TGC Lead Developer
20
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 8th Dec 2011 01:28
You are right in that the app will not work in the simulator. Paul and I suspect something to do with the tool running x86 whilst the devices actually run Arm (or something). Anyhoo, the only real way to test Android apps is with an Android device (2.3+).

It sounds like you are compiling everything fine if you see the AppGameKit Player standby screen (no small achievement so congrats). If it was this easy, everyone would be Android developers It sounds like the AppGameKit Player does not know you have a bytecode.byc file that needs running, and this step is VITAL.

Make sure you comment in the CORRECT line in the interpreter.cpp. It will be the one below the line: #IFDEF IDE_ANDROID

You will now have a line like this:

strcpy ( g_pInterpreterByteCodeFile, "bytecode.byc" );

Naturally, you will now need to rename your byte code file you copied from your T1 project to become bytecode.byc so the interpreter can find it. This requires your byte code file is in the right place with the right filename.

When I compiled SnakeSnacker for publication on the Android Marketplace, here is where I have my bytecode.byc file:

C:\android\AGK\IDE\apps\SnakeSnacker\assets\bytecode.byc

Also, all my graphics are in:

C:\android\AGK\IDE\apps\SnakeSnacker\assets\

I also made sure the assets folder was listed in my Android project tree by pressing F5 and double checking the bytecode.byc file was present.

With these checks in place, the AppGameKit Player standby screen cannot appear as normal, as the player is now being asked to load the bytecode.byc file which has been confirmed as existing when you pressed F5. Always a good idea to triple check spelling, cases, e.t.c.

Let me know how you get on

I drink tea, and in my spare time I write software.
Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 8th Dec 2011 15:54
Quote: "It just sits at the initial android boot screen. is it supposed to run on this?"

It takes about 5/7 minutes to actually get to the virtual phone. Just wait longer. However I didn't know the apps wouldn't run in it. I guess I moved over to a physical device before I corrected whatever I was doing wrong! lol

My signature is NOT a moderator plaything! Stop changing it!
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 8th Dec 2011 22:52
@mobiius, "It takes about 5/7 minutes to actually get to the virtual phone. Just wait longer". I have waited for way over that amount of time. My system is pretty fast in general, the emulator is up in a minute or less normally. It sure doesn't seem to be doing anything.

@ Lee, I have my assets set up correctly by the sounds of your post. I haven't had chance to test my latest build yet since my last post as I don't have a phone and only get to test it on the odd occasion my Bro can be bothered to try it

I have an android emulation setup to try to test it but I cannot so far get the file on to the emulation. I have tried FTP and dropbox without success so far. I have also tried making shared folders in the emulator but so far I haven't had any luck with that either.

I'm pretty sure I will get there eventually, but progress is hampered by my lack of test options. I must say I was very pleased with the performance on the Android phone when I tried a couple of projects using AppGameKit to send them over directly. A frogger clone called Froggit, and my Side Shooter I haven't thought of a name for yet.

LeeBamber
TGC Lead Developer
20
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 9th Dec 2011 00:34
if you want to post the Android emulator issue as a bug on the issues board, we can start this up as an official AppGameKit problem. I would like the blame the Emulator itself but that would be too easy and not very convincing. Let's treat this as a bug and get your app running on the emulator in all it's glory (when the emulator finally decides to make an appearance that is).

I drink tea, and in my spare time I write software.
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 12th Dec 2011 20:52 Edited at: 12th Dec 2011 21:53
I have posted it as a bug for now. It would be useful to see it running on the emulator when testing the build if possible. Still no further forward with the compile process yet. Perhaps a video showing the process being done from scratch would help people make sure they haven't made a silly mistake in following the text of the guide? I was a little confused about the assets folder, as the guide makes it sound as if it should exist already, but I had to manually make the folder and then copy the data in. The fact my game doesn't run, but the player does, makes me think I have got this wrong, but I am in no way sure
I include a screenie of the the line I have changed that has been mentioned. As far as I am aware that seems correct.



Attachments

Login to view attachments
Deion
18
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United States
Posted: 13th Dec 2011 04:24 Edited at: 13th Dec 2011 04:24
got it compiled run it from simulator and crashes....

Cheers,
Deion G.
nz0
AGK Developer
13
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 15th Dec 2011 00:55
I didn't have any expectations of the simulator. Just get the apk onto your device (usually quicker than the simulator starting up anyway).

I use astro to quickly copy it from my sharepoint (but there's numerous ways to get it onto your device anyway)

nz0
AGK Developer
13
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 15th Dec 2011 01:01 Edited at: 15th Dec 2011 01:03
@dvader: once you change that line, you need to recompile the libs through cygwin.

Make sure bytecode.byc is in your assets folder when building in eclipse.

If you followed the guide advice, you'll have a folder in c:\android\apps\[yourapp] which started off as a copy of "interpreter_android" but with an "assets" folder added, and the contents of your "media" folder dropped in.

If you like, we can set up a remote control session and I'll help you get it up and running

[edit] I ended up with the player running when I thought it would be my game at one point, so I know what you mean..

Digital Awakening
AGK Developer
18
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 15th Dec 2011 12:55
I'm just wondering. What about a video showing every step you have to do? Starting with nothing but AppGameKit installed and a working project. I think a step by step video instruction would be very helpful. I'm dreading setting this stuff up myself, no idea if I could get it to work on my own.

Funnell7
9
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 15th Dec 2011 16:26
Quote: "I'm just wondering. What about a video showing every step you have to do? Starting with nothing but AppGameKit installed and a working project."


+1 for me. Would be great if someone was willing to do this...
DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 17th Dec 2011 21:37 Edited at: 18th Dec 2011 18:29
@Digital Awakening. I agree, and have stated before that videos need doing for this.

@nzo. From the sounds my directory structure is a little different to that. I have my app in, C:\android\AGK\IDE\apps. I have practically given up for the moment. I have been spending too much time on this with no success. It really doesn't help matters that I have no device to test on, and have to rely on the emulator to see if anything is happening. I did try a bada build in the meantime but fared even worse with that one.

Are the guides being kept up to date with new phone updates? Already the android and bada one look out of date to me. The bada one having a step I just couldn't see available at all! The Android is closer, but still they are on ndk7 now rather than 6. TGC need to keep on top of the standard guides for this or they will be out of date in no time.

I tried the bada one because the emulator is supposed to work ok.

EDIT - On looking around at other peoples posts I have noticed that there is a problem with upper and lowercase files? My main project has caps in the title, and also some of the image names. I have tried changing the names in the assets folder to lower case, and the directory name also. No change (that I can see) in the compile though. Although I haven't changed the name of the app in the configuration files to be in lower case yet.

Talking of the name of the app. I changed the name agkplayer to my apps name in the config files as stated in the guide. However later I am asked to change the bytecode name to bytecode. Which I have done, so does it only use the name in the config to name the new compiled apk or not? I'm tempted to try putting bytecode as the apps name instead.

One last thing regarding the image names. Do I need to alter the AppGameKit code for lower case names too? Or will AppGameKit ignore this?

nz0
AGK Developer
13
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 18th Dec 2011 22:46
@dvader: Who knows what you may have naffed up in the preperation of the files/folders (no offence)
It would be best to start from scratch and I'm prepared to help you with a remote session.

The other option is to re-follow the instructions and use the recommended directory settings (e.g. where to install the android stuff, etc.)

Get a device. Forget the emulator.

DVader
16
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 20th Dec 2011 21:49 Edited at: 20th Dec 2011 21:50
No offense taken, I realize I have probably naffed something up somewhere.
No chance of getting a device at the minute, shoestring budget I'm afraid. I'll have another proper effort at it when I get my current project finished. I have only been trying to get a small demo running for the present. Thanks for the offer of a remote connect, but am a little reluctant to open my pc up like that to someone from off a forum (no offense meant, I'm sure you wouldn't be putting nasties on my PC).

The Zoq2
10
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 20th Dec 2011 22:19
@nz0 I could use some help with this to, perhaps a remote session but I think that a "in depth" video tutorial would help both me and the rest of the community... I may even be able to pay you something for a video!
Tone Dialer
Valued Member
14
Years of Service
User Offline
Joined: 17th Oct 2005
Location: England, well a town in it !
Posted: 1st Jan 2012 20:28 Edited at: 1st Jan 2012 20:30
After a day of following the Tier 1 (BASIC) Publishing guide for Android 2.3, and reading all the posts on the subject, I finally got my App compiled and onto my Samsung Galaxy S1.

It works (well sort of), all except the sprite graphics which just show up as white squares with red crosses in them.
The game is running but not playable (yet).

I guess the compiler could not find the graphic files or something, does anyone have an idea where I have gone wrong? please.

The game displays and works fine using the AppGameKit player.

Happy new year!

Tone Dialer
Valued Member
14
Years of Service
User Offline
Joined: 17th Oct 2005
Location: England, well a town in it !
Posted: 2nd Jan 2012 15:29 Edited at: 2nd Jan 2012 15:52
I found the answer to my sprites not displaying correctly, the answer is here..

http://forum.thegamecreators.com/?m=forum_view&t=191735&b=46

In a nutshell, AppGameKit Player and PC dont seem to care about case in filenames, but when compiling it certainly does matter, its got to be all lowercase.
I have now got the AppGameKit PC re-compile > CYGWIN > Eclipse > Phone App process down to a 5 minute routine, see below.

AGK:
Make Changes to .cbp file
Compile

Explorer:
From inside your 'media' folder, Copy 'name'.byc and any sub folders (if anything in them has been changed) to C:\Android\AGK\IDE\apps\'name'\assets

Rename 'name'.byc to bytecode.byc

CYGWIN
NOTE: Use Up-arrow to find last used commands

$ cd "/cygdrive/c/Android/AGK/IDE/apps/'name'"

$ "/cygdrive/c/Android/android-ndk-r7/ndk-build"

NOTE: The last line is correct as it is, dont be confused by the instructions having '2> log.txt' on the end, the '2' is a typo and should be a " and '>log.txt' is only needed if you want to capture all the compiler messages.

Eclipse

Highlight the Project Package

Select: Project, Clean, OK

Select: Run, Run Configurations, Run

Android App is sent to my Phone (already connected via USB) and runs automatically.

I hope this helps.

World Class Multimedia
12
Years of Service
User Offline
Joined: 15th Aug 2008
Location: Florida, USA
Posted: 4th Jan 2012 03:46 Edited at: 4th Jan 2012 03:47
I REALLY suggest a video tutorial and EASY explanation for us complete idiots. I can program basic, and I can even find my way around a linux box, but the rest is just too much for my slow 43 year old brain.

HALP!!!! I just cannot use cygwin to compile and I have no idea what I am compiling to begin with????

I copied the IDE folder from AppGameKit to c:\android\IDE
I copied the ndk 7 folder after unzipping it to c:\android\ndk

I then typed in:

cd /cygdrive/c/android/IDE/apps/interpreter_android

That worked. I then typed:

/cygdrive/c/android/ndk/ndk-build 2> log.txt

It gives me the noted awk being old and out of date message.

I deleted, moved, renamed and sliced and diced the awk.exe file and I always get that message.

I'm stuck.

Mike

YOU DREAM IT - WE CREATE IT!
www.world-class-multimedia.com
For world-class virtual instruments - www.supersynths.com
Tone Dialer
Valued Member
14
Years of Service
User Offline
Joined: 17th Oct 2005
Location: England, well a town in it !
Posted: 4th Jan 2012 08:40 Edited at: 4th Jan 2012 08:42
@World Class Multimedia

The AWK.EXE problem is a known issue with NDK release 7, see link.
http://code.google.com/p/android/issues/detail?id=23604

I just renamed awk.exe to awk_.exe in ndk...\Prebuilt\windows\bin

Also I found
/cygdrive/c/android/ndk/ndk-build 2> log.txt

should be
"/cygdrive/c/android/ndk/ndk-build"

World Class Multimedia
12
Years of Service
User Offline
Joined: 15th Aug 2008
Location: Florida, USA
Posted: 4th Jan 2012 17:25
I did as you suggested.

I renamed awk.exe to awk_.exe in the android/ndk/Prebuilt/windows/bin directory.

I used the following two lines on cygwin:

cd /cygdrive/c/android/IDE/apps/interpreter_android
/cygdrive/c/android/ndk/ndk-build

This is the error I received:

$/cygdrive/c/android/ndk/ndk-build
make: awk: Command not found
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
/cygdrive/c/android/ndk/build/core/init.mk:258: *** Android NDK: Aborting . . .
Stop

So, what now?

Mike

YOU DREAM IT - WE CREATE IT!
www.world-class-multimedia.com
For world-class virtual instruments - www.supersynths.com
Tone Dialer
Valued Member
14
Years of Service
User Offline
Joined: 17th Oct 2005
Location: England, well a town in it !
Posted: 4th Jan 2012 20:35 Edited at: 4th Jan 2012 20:36
Mike,

I renamed my AWK_.exe back to AWK.exe and rebuilt, got similar message to yours i.e
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
/cygdrive/c/android/ndk/build/core/init.mk:258: *** Android NDK: Aborting . . .
Stop

However I did not see the' make: command not found line'.

Are you sure that you re-ran the CYGWIN set-up to enable the Make functionality, this step is vital.
I had to run CYGWIN setup again, select install from local directory, then open the Devel tab and select GNU MAKE Utility, then install it.

westalke
8
Years of Service
User Offline
Joined: 8th Dec 2011
Location:
Posted: 12th Jan 2012 06:33
Just download the 6b ndk - this is the currently approved and tested version - that the existing api was built around.

Westa
3d point in space
11
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 18th Jan 2012 22:32 Edited at: 18th Jan 2012 23:11
i found that the guide told you to download
http://developer.android.com/sdk/ndk/index.html
but version 6 is not there

so i did a google search for the file and found

http://www.crystax.net/en/android/ndk/6#download

i got my app submitted to the app store know I just need the droid version.

Go through yourself at a wall.
ICERGB
17
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 30th Jan 2012 02:08
Quote: "I just renamed awk.exe to awk_.exe in ndk...\Prebuilt\windows\bin

Also I found
/cygdrive/c/android/ndk/ndk-build 2> log.txt

should be
"/cygdrive/c/android/ndk/ndk-build""


Followed the above and it worked for me.

I used
kdf
14
Years of Service
User Offline
Joined: 31st May 2006
Location:
Posted: 7th Feb 2012 18:38
I just got the Android toolchain working upto the point where I load the apk onto the emulator. However, like some of the others I am getting the AGKPlayer appearing in standby.

Workarounds I tried
1) Instead of making a copy of the interpreter_android and renaming it to foo, I did a direct compile using the original project name 'AGKPlayer' to avoid an manifest file conflicts when renaming the package.

2)I tried to force the flags g_iAppControlStage and g_iAppIsStandalone, in interpreter.cpp to run as standalone app and ignore network activity.

3)I tried compiling with both NDK 6b and 7

However, neither of these helped.

Although ARM emulation on x86 could be an issue, as Lee suggested, I noticed the following

When I do a commandline adb install of other apk files like waterlite.apk (a demo built by one of the forum members) they run perfectly in the emulator. But the same commandline install for my T1 apk doesn't.

Was also wondering if its just an emulator issue for T1 compiles, as I haven't got a 2.3+ device to do on-device debugging.

Could someone clarify if they have done an emulator install of the apk that doesn't work (AGKPlayer waiting screen pops up), but if they do an on-device debug of the apk it DOES work ??
Paul Johnston
TGC Developer
17
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Feb 2012 00:32
It sounds like you need to find the line



in interpreter.cpp and uncomment it, this will setup the g_iAppIsStandalone and g_iAppControlStage variables to load the file specified in the above line.
kdf
14
Years of Service
User Offline
Joined: 31st May 2006
Location:
Posted: 8th Feb 2012 09:25
@Paul

I've followed the guide to the letter t. Uncommented the line so that the bytecode file is visible to the interpreter and done all the rest.

I was just wondering how another T1 build (waterlite.apk) does an adb install on the emulator cleanly, but my build doesn't.

Looks to me like there is some environment setup details some of us are missing out, that others aren't. I'd hesitate to call it an AppGameKit bug since it manifests only in certain peoples builds. Your thoughts on it?
Paul Johnston
TGC Developer
17
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Feb 2012 17:03
I haven't done an adb install to the emulator, I tried the emulator from the eclipse IDE and found it very slow, but not had any problems using eclipse with a device.

Login to post a reply

Server time is: 2020-09-30 17:20:52
Your offset time is: 2020-09-30 17:20:52