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.

AppGameKit Classic Chat / Help building T2 Android?

Author
Message
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 22nd Mar 2014 12:52
Hi all,

I've been carefully going through the Tier 2 Android guide, trying to get set up for building native Android apps, but I'm stuck.

The guide was just barely sufficient up to this point, but now it says this, and I have no idea how to do this:

Quote: "To compile the tier 2 template app open cygwin and browse to the android template directory (cygwin is case sensitive and does not allow spaces in your project path), for example in my enironment that would be 'cd "/cygdrive/c/android/AGK/IDE/template/template_android" then try to compile the template with the path to the NDK installation e.g. "/cygdrive/c/android/android-ndk-r6b/ndk-build 2> log.txt" errors will be put in log.txt in the template_android folder. This compiles all the C++ code into the native library that will be the main part of the Android application."


What. How? Most of that makes no sense and "try to compile" is not good enough. Not all of us are experienced with Linux commands. TGC, I can't believe you've STILL got 2-year-old badly-worded guides in your help files!

Could somebody explain what exactly I'm supposed to do at this point? Thanks

Parry
AGK Developer
14
Years of Service
User Offline
Joined: 16th Dec 2009
Location: Swampstone
Posted: 22nd Mar 2014 13:44 Edited at: 22nd Mar 2014 13:54
I used this guide http://forum.thegamecreators.com/?m=forum_view&t=203424&b=46 to compile a tier 2 android app. It creates a batch file called "HardCodedComplileScript.bat" that compiles it for you.

I did run into a few problems on what versions to install. I ended up using Eclipse Version: 4.2.2 32-bit and Java SE development kit 7 must also be 32-bit. This guide says 64-bit would work, but it wouldn't detect it.

Hope this helps.
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 22nd Mar 2014 13:58 Edited at: 22nd Mar 2014 14:00
Thanks, I'll go through that carefully tomorrow; it may just be what I need!

Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 22nd Mar 2014 14:13
Nope, I'm still stuck. Basically I had managed to work out more than the (official) guide told me up to the same point as step 43 of the forum guide. At step 43, I get this error:

Quote: "Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it."


What do I do?

The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 22nd Mar 2014 18:12
Clonkex

Make sure ALL your directory names contain NO spaces as cygwin cannot understand these (cygwin is a unix tool not a windows tool!)

I have managed to get past that and have imported the project into eclipse! I have nothing but java errors...(see attached screenshot..not sure how to embed into message!)

Being NO java expert, I am not sure how to correct these? I have tried Android Tools->Fix Project Properties, which does nothing! I have tried Android Tools->Add Support Library...no change!

Anyone whom can assist...be most grateful!

www.bitmanip.com
All the juicy you could ever dream of!

Attachments

Login to view attachments
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 22nd Mar 2014 18:26
I just followed the very clear step by step guide and still have errors in

MyFaceBookActivity.java->OnCreate(Bundle):void
In this Method I have crosses by
a) setContentView(R.layout.facebookmain);

and

b) session.openForRead(new session.OpenRequest(this).setCallback(statusCallback));

Any ideas?

www.bitmanip.com
All the juicy you could ever dream of!
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 22nd Mar 2014 19:09
STOP PRESS

Just got the template_android_lite working!

Hooooooooooooooooooooooray!

No I have Basic, Tier 2 and (my preferred) AppGameKit Pascal!

YumYum

www.bitmanip.com
All the juicy you could ever dream of!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 22nd Mar 2014 19:38
Awesome! "It's good when a plan comes together."

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 22nd Mar 2014 19:57
We need the r9b as NDK and Android 16 at least support.
Using cygwin is useless, and AppGameKit must update all the Android part.

I continue to confirm, AppGameKit for Android doesn't work.

Long life to Steve!
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 22nd Mar 2014 20:40
xGEKKOx

Have you also had 'issues' with android? What Tier? What versions?

I must confess, that AppGameKit COULD be really great, but the deployment is a mess. As much as we all want feature x and feature y, I personally think the deployment from all tiers to all deployment options should have been made bullet-proof prior to it being released at all.

If you look at, for example, Monkey X, one click deploy done! it can be done, it SHOULD be done here IMHO. The point of buying into software like AppGameKit is that we want to code games! We need to spend our time doing this and only this...mot spending hours getting 'hello' world to build and deploy.

Rant over!

www.bitmanip.com
All the juicy you could ever dream of!
Caps On!
13
Years of Service
User Offline
Joined: 3rd May 2011
Location:
Posted: 22nd Mar 2014 21:25
Agreed.... tier 2 setup documentation needed!

Truth, Justice, and the Programmer's Way!
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 22nd Mar 2014 23:29
My path definitely contains no spaces. This is my HardCodedCompileScript.bat:



I still have no idea what the problem is.

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 23rd Mar 2014 01:23
Clonkex you are using cygwin, so you are using deprecated Android functions and old NDK.

Now, if you want to use the AppGameKit 108.21 you need to don't use cygwin and use the ndk-build command.

We need immediately a tutorial step by step, but PRECISE, and i mean after i press compile, it must RUN!!!!!!!!!

My time, as the other time, is MONEY, so we can't spend time to understand what was in the AppGameKit coder mind.

I don't mind if the template will be a crap, or full of files, i want it start at first button press!!!!

I agree totally with The Daddy.

Clonkex, you may be angry instead of happy, cause your build will not work on many device.

WE NEED (sorry if i write capital):
TIER 2 ANDROID BUILD WITH LAST (OR AT LEAST 16) NDK RELEASE!!!!
PLEASE TGC DO THE TEMPLATE FOR NETBEANS INSTEAD OF ECLIPSE, YOU WILL SEE IT'S MORE EFFICIENT AND WILL WORK BETTER AND EASILY!!!!!

Long life to Steve!
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 23rd Mar 2014 01:28 Edited at: 23rd Mar 2014 12:24
Quote: "Now, if you want to use the AppGameKit 108.21 you need to don't use cygwin and use the ndk-build command."


But what then? Does no one actually understand my problem?

Quote: "Clonkex, you may be angry instead of happy, cause your build will not work on many device."


I'm sure this made more sense in Italian... right now my build doesn't build - that's the issue.

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 23rd Mar 2014 01:47
Ah sorry Clonkex, i understood you was happy to build with the old version of the template.

Long life to Steve!
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 23rd Mar 2014 02:25
Quote: "Ah sorry Clonkex, i understood you was happy to build with the old version of the template."


I honestly have no idea whatsoever about versions. I'm using exactly what the official guide tells me to use and the latest version of stuff it doesn't specifically tell me otherwise. Why would I be using an old template?

The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 23rd Mar 2014 09:38
You can build using the latest NDK version without a problem, as far as I know you still need cygwin (unless you are doing it on linux which I found is a lot easier).

I don't think the NDK changes which version the apps can run on either, the SDK does so the apps should still run on android 2.3.1 if you want them to. Most devices out there has 4.0+ anyway so I don't think not being able to run on 2.3 would be an issue

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 23rd Mar 2014 09:49
Hi Clonkex. I notice you're using the 64 bit version of Cygwin. Might that be the problem? I thought you needed to use the 32 bit version.

I was actually working on some Tier 2 tutorials following a discussion in another thread and I've nearly finished the building for Tier 2 one. I'm not sure how much it adds over the other guides that you've already seen though. That said, I'll try and get it up soon in case it helps.

Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 23rd Mar 2014 12:23
Quote: "You can build using the latest NDK version without a problem, as far as I know you still need cygwin (unless you are doing it on linux which I found is a lot easier)."


That's good, I'm using the latest version. I'm just following tutorials exactly as they appear, I really know nothing about Linux (and am definitely not using it). I don't really know what Cygwin is actually doing or how on earth I would go about NOT using it if for some reason I wanted to.

Quote: "I don't think the NDK changes which version the apps can run on either, the SDK does so the apps should still run on android 2.3.1 if you want them to. Most devices out there has 4.0+ anyway so I don't think not being able to run on 2.3 would be an issue"


Good, but....I never thought otherwise. Really not sure why you're saying this...

Quote: "I notice you're using the 64 bit version of Cygwin. Might that be the problem? I thought you needed to use the 32 bit version."


Ah, now that's something to try. Now downloading the 32 bit version of Cygwin and we'll see how that goes

Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 23rd Mar 2014 12:38 Edited at: 23rd Mar 2014 12:38
Unbelievable! It WORKED!

After all this mucking around it was just the 64 bit version of Cygwin causing the problem! Stupid-

...stop stressing and try to relax....hhhhh.....deeeep breaths.....just because some companies refuse to listen when they are told they're documentation sucks doesn't mean I have to be angry....

Ahhhh, now I can finally get on with trying to build the apk. Relaaaaaxxxx.....




xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 23rd Mar 2014 14:56
Boys, in the past months i also had the Android build without cygwin.
Using NDK-BUILD directly.

You don't need cygwin, cause in the manifest.xml you add the files you want to compile and ndk-build do it for you.

Now...
We need at least the 4.2 Version of SDK, so why use the old method?

The problem is that AppGameKit is completely unstable.
I wanna be clear..

- The hello world template works 60% of the time, the other 40% the app crash on start
- A complex game in c++ don't work as eclipse lose always the settings

I'm very bored to restart eclipse everytime i have to build.
This is why i want TGC team prepare a NETBEANS template.
And especially they may do a PERFECT guide on how to build directly from the IDE.

I don't want .bat, i don't want cygwin, i don't want to open the console and build manually, i want to press the xxxxxxx RUN button and look my game run on the device.

Sorry if i get angry, but i'm frustrated by the TGC completely absence on the most important part of a engine release: PRESS RUN AND REALLY RUUUUNNNNNNN!!!

Well...
If someone of you, is good enough to prepare a template in eclipse to run :
- No CygWin
- NDK lastest release
- SDK 16 at least

Please publish it on the forum.
I see always: "Wow i done it", "wow it works" and nobody share it on the forum. I start to think is not real you have it working for Android.

Long life to Steve!
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 23rd Mar 2014 18:10 Edited at: 23rd Mar 2014 18:10
Gekko,

Forget Netbeans, AppGameKit will work reliably only with Eclipse.

To get rid of .bat and typing command line syntax and do automatic builds use this:

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

I have already posted this 100000 times in the past, but no one at TGC cared enough to implement it in the templates (takes 5 mins!). Let the users suffer!!!!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Mar 2014 19:23
I have a complete Tier 2 game working in Android, Windows, Mac and iOS (I just need time to complete all the levels).

I haven't updated to v10821 yet. My v10819 works fine on all the devices I've tested it on. And has been quite stable on multiple devices with different versions of Android.

You don't have to restart Eclipse to redo the APK, you only need to refresh the project.

I had been using cygwin directly (opening a window) and eventually started running into to many access issues and switched to the batch file method, and that works fine for me now.

Bjadams, thank you for the link. The only downside on the instructions seems to be that you need to change the 'working directory' before building for each product. But that is minor. I hope to have time to try this soon. Then I will only need my batch files that update the code, media and data files to match the ones in the Windows build.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 23rd Mar 2014 20:09
My guess is that your issue is because you are trying to build your app with the 4.2 SDK, if something has changed in the SDKs, it will obviously cause an issue. Have you tried building with the 2.3.* SDK and checked if you get the same issue.

The SDK build form inside eclipse looks really neat, I should try set that up for myself. I wonder if there is a way to get a debugger working in android aswell

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 23rd Mar 2014 21:31
Although I'm using T1, I wanted to note that I'm using Android API 19 successfully. It didn't require any changes and allowed us to be listed in the store as "built for tablets". The downside is that with API 19 it appears that the way AppGameKit END works is not good. It sends a signal to Android that the app has closed prematurely. Basically the issue is that the app itself should never terminate on its own in Android, but instead allow the OS to handle that (or a process terminator). The AppGameKit END command should instead be sending the app the the background similar to what the home key does.

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 24th Mar 2014 06:37
The problem is i need 4.2!!!!
Boys, i don't use cygwin, and it work perfectly under NetBeans.
Eclipse is the shame of IDE.
If you search on google "Eclipse lose linker" you find millions post.
So, Exlipse doesn't work as expected, AppGameKit with 4.2 SDK doesn't work and i'm in the XXXX.
Only another engine can save me.

Lady, you posted a tutorial about how to compile without cygwin, and you use cygwin??????
2 possibilities here:
1 - You all are kidding me!
2 - The forum going crazy and nobody wanna share his template.

If 2, i will ask to delete all my post on iOS and i will not help nobody else more.
I'm very very angry!!!!!


Long life to Steve!
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 24th Mar 2014 10:43
https://www.dropbox.com/s/5zzjlmpf27ba9vh/AndroidTemplateLite.zip

That's the template im using to compile. I use android-ndk-r9c and android SDK 9 and 3.2 (the ones mentioned in the guides). Im also doing it on linux but that just means that I don't have to go thru cygwin and can type the commands in a regular terminal. I use the ADT IDE which is a version of ecpipse with the android SDK already installed.

To compile it, navigate to the project directory using cd, then I build the project using <path to ndk>/ndk-build 2>log.txt. After that, refresh the project (right click and select refresh or press F5 with the project selected) and select run as android application. As far as I know, this works on my TF300 (tegra 3 android 4.2.2), my galaxy note (custom nexus like rom, android 4.2.1) and an xperia Z (android 4.*). I don't remember what AppGameKit version im using but I think it's 108 beta 18 or 19. I might try building it using the 4.2 SDK later if you want me to

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 24th Mar 2014 12:49
Quote: "The problem is i need 4.2!!!!"


So make your own thread and stop hijacking mine!

Quote: "Lady, you posted a tutorial about how to compile without cygwin, and you use cygwin??????"


Not everyone thinks using Cygwin is actually a bad thing. For me it would be more work to not use it than to use it for exactly the same results.

Quote: "I'm very very angry!!!!!"


Go away, calm down, come back and ask politely. More to the point, actually ask a question. So far all you've done is rant on about random crap without any point.

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 24th Mar 2014 16:42 Edited at: 24th Mar 2014 16:51
Clonkex, your game with cygwin, will not work on all device, have you understand this?
I'm trying to get you in the right way.

Thx Zoq2 finally someone that really do what he say.

Edit : Only the project settings??? I have the same file.
I will open a new thread!

Long life to Steve!
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 24th Mar 2014 16:54
Oh, something must have gone wrong, i'll upload a better version.

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 26th Mar 2014 02:01
Quote: "Lady, you posted a tutorial about how to compile without cygwin, and you use cygwin??????"

I did? Where? I have no memory of this at all. I have always used cygwin or the batch files.

I have not done anything with v10821 yet. And the templates I used for v10819 were pretty much what came with the installation. Aside from that, I have made all prior templates available on the AGK Wiki.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 26th Mar 2014 14:05
Quote: "Clonkex, your game with cygwin, will not work on all device, have you understand this?"


What devices will it not work on? Do you mean a particular version of Android or a particular device?

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 26th Mar 2014 17:05
Hi Clonkex, sorry for late response, but i discovered where was the problem in my code.
AGK HTTP is not working. You can read the posts i done with images in the other thread "AGK 108.21".

Now i know the Zoq template work fine, and directly from eclipse.
I discovered where to change the settings in eclipse to get it work without annoying, and where to change some path.

Now is all in the Paul's hands. I tested with an external library and all work on HTTP.
When we use the AppGameKit one it go on timout or don't reach the IP.

This is why my games don't work, as they are all attached to an external dedicated server to get statistics.

Long life to Steve!

Login to post a reply

Server time is: 2024-11-25 03:58:07
Your offset time is: 2024-11-25 03:58:07