The TGC posted Tier 2 Android template is not quite right. The one on the
AGK Wiki Template page definitely works.
To avoid some of the permissions issues, once you copied the AGK/IDE directory into your Android directory, you need to determine the user and group that exist in your cygwin window like this:
1. Open a fresh cygwin window
2. Execute the command 'pwd' to show your current directory. Your cygwin user name is the last directory in the path.
3. execute the command 'cd ..' (moves up one directory) followed by 'ls -l' (all letter el, no ones)
4. You should see something like (<user> is your cygwin user name, <group> is your cygwin group):
total 4
drwx------+ <user> <group> 0 <date> <user>
5. Navigate to the AGK directory in your Android path. The command on my setup would be 'cd /cygdrive/c/Android/AGK107/IDE'.
6. Execute the following commands (substitute the correct user and group for <user> and <group>):
chown -R <user>:<group> *
chmod -R 777 *
The last two commands make sure that you have the proper permissions for everything else that gets done (cleans, compiles, etc.).
If you use Windows File Explorer to copy files from your Windows AppGameKit project to the Android one, you will want to execute those last two commands in the project directory, just to make sure that Eclipse and cygwin both are able to read and write where necessary.
It is also a good idea to clean before each build to make sure everything compiles cleanly:
/cygdrive/c/android/android-ndk-r8b/ndk-build clean
The proper cygwin-Eclipse sequence is:
1. Clean and build in the cygwin window
2. Open Eclipse (if not already open)
3. If Eclipse is already open, select your project and refresh it (press the F5 key, there is no feedback for this, you just have to take it on faith; or right click and find 'Refresh' in the menu and select it)
4. Select your project and run it (as an Android app).
5. If Eclipse recognizes your device that may be connected, then it your app should appear on it and it will stay installed.
6. If Eclipse doesn't see your device, don't worry, go ahead and cancel the play window thingy.
7. In either of the two previous steps, Eclipse has created a loadable apk file in your bin directory (which you would have already created, along with the gen directory).
8. Download the apk file to your device any way you can, install and run it.
Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master