GLBasic forum

Main forum => GLBasic - en => Topic started by: caffeinekid on 2011-Sep-18

Title: Why won't it compile for Android?
Post by: caffeinekid on 2011-Sep-18
I had it working a few weeks ago and haven't changed anything at all apart from updating GLB. It is saying there is no build.xml file and that's where it's falling down and I don't have a clue why. This is my first GLB project and to be honest I don't really know what I'm doing. :) I have the Android SDK installed and the Java one too.

Quote_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.8.048 SN:803f2fbb - 3D, NET
Wordcount:43 commands
compile+link:
BUILDSRIPT
BUILD STAGE 1: Compile and pack
Error: Could not find or load main class Files
Buildfile: build.xml does not exist!
Build failed
BUILD STAGE 2: Install on device
Buildfile: build.xml does not exist!
Build failed
Android=C:\Users\Andy\Documents\GLBasic\My Projects\Blitz\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 5.6 sec. Time: 12:04
Build: 1 succeeded.

Any help much appreciated. I've tried putting the project in a space free path (in the root) but it made no difference.
Title: Re: Why won't it compile for Android?
Post by: Minion on 2011-Sep-18
Personally, I would uninstall GLB and reinstall complete. Ive had a few problems with it locking certain android files, and creating o size files. But that usually does the trick.
Title: Re: Why won't it compile for Android?
Post by: caffeinekid on 2011-Sep-18
Uninstalled and reinstalled and no difference at all. It was worth a shot I guess.
Title: Re: Why won't it compile for Android?
Post by: Moebius on 2011-Sep-18
Have you tried clearing the distribution folder?  Just delete the distribute folder or click the bin icon in GLB.
Title: Re: Why won't it compile for Android?
Post by: okee on 2011-Sep-18
Try moving the project folder to the c drive i.e. c:\mygame and see does it
compile from there, also make sure you have the latest version of GLB

Title: Re: Why won't it compile for Android?
Post by: caffeinekid on 2011-Sep-18
Thanks guys. I've followed both those pieces of advice and still have the same error.

Quote_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.8.048 SN:803f2fbb - 3D, NET
Wordcount:43 commands
compile+link:
BUILDSRIPT
BUILD STAGE 1: Compile and pack
Error: Could not find or load main class Files
Buildfile: build.xml does not exist!
Build failed
BUILD STAGE 2: Install on device
Buildfile: build.xml does not exist!
Build failed
Android=D:\Blitz\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 3.4 sec. Time: 15:09
Build: 1 succeeded.
Title: Re: Why won't it compile for Android?
Post by: Minion on 2011-Sep-18
Is the JAVA_HOME variable set correctly ?

Is your java sdk up-to-date ?

Is the android SDK up-to-date ?

Have you set the options in GLB for Android compilation etc ?

Have you rebooted the PC since you last had a succesfull Android compilation ?

Sorry, just running thru the things I can think of, wether there relevant or not. Its gotta be something simple.
Title: Re: Why won't it compile for Android?
Post by: caffeinekid on 2011-Sep-18
Java_Home is set to C:\Program Files (x86)\Java\jdk1.7.0 and as you can see, it's the latest version?

What options need setting up in GLB for Android?

I'm going to uninstall and reinstall the Android SDK and if it doesn't work at least it's another thing to cross off.
Title: Re: Why won't it compile for Android?
Post by: MrTAToad on 2011-Sep-18
Dont forget to install it in the root of a drive - it wont work if it is installed in any location with spaces in the name.

Also, try using Java 1.6.0_25 instead (32 bit version and not x64)
Title: Re: Why won't it compile for Android?
Post by: caffeinekid on 2011-Sep-18
Install the Android SDK to the root?

I have installed jdk1.6.0_26 if that is better? I thought newer would be better.
Title: Re: Why won't it compile for Android?
Post by: Minion on 2011-Sep-18
Im using jdk1.6.0_27 with no problems.


Try creating a brand new project, nothing in it barr a print "helloworld" line and then see if that will compile
Title: Re: Why won't it compile for Android?
Post by: caffeinekid on 2011-Sep-18
Panic over, it compiled after reinstalling the Android SDK again from scratch. Something must have got foobarred since the last time I tried about six weeks ago.

Thanks for your assistance guys.
Title: Re: Why won't it compile for Android?
Post by: Kitty Hello on 2011-Sep-19
Yay, Caff is in da game!
Title: Re: Why won't it compile for Android?
Post by: caffeinekid on 2011-Sep-20
I've had GLB for a few years now mate and thought it was about time I actually used it and had a play. :)

Starting simple - it's a bit different to what I'm used to in BlitzMax - but I'm getting there, hopefully.

It's good to be here Mr Kitty. :)
Title: Re: Why won't it compile for Android?
Post by: Kitty Hello on 2011-Sep-20
I'm glad you got your mojo back. It's a bit different, because Blitz handles objects internally, where GLBasic just has indices for resouce slots that you can "draw" or "play". When using GENxxx commands, it's pretty much the same for the loading. If you want some sort of "entity system", there's code on the forums for both, 2D and 3D.