BASIC

Author Topic: Why won't it compile for Android?  (Read 2446 times)

Offline caffeinekid

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
    • TCKSOFT
Why won't it compile for Android?
« 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.

Offline Minion

  • Mr. Polyvector
  • ***
  • Posts: 229
    • View Profile
Re: Why won't it compile for Android?
« Reply #1 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.

Offline caffeinekid

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
    • TCKSOFT
Re: Why won't it compile for Android?
« Reply #2 on: 2011-Sep-18 »
Uninstalled and reinstalled and no difference at all. It was worth a shot I guess.

Offline Moebius

  • Dr. Type
  • ****
  • Posts: 315
    • View Profile
Re: Why won't it compile for Android?
« Reply #3 on: 2011-Sep-18 »
Have you tried clearing the distribution folder?  Just delete the distribute folder or click the bin icon in GLB.
Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
- Random Shack Data Processing Dictionary

Offline okee

  • Dr. Type
  • ****
  • Posts: 324
    • View Profile
Re: Why won't it compile for Android?
« Reply #4 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

Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)

Offline caffeinekid

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
    • TCKSOFT
Re: Why won't it compile for Android?
« Reply #5 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.

Offline Minion

  • Mr. Polyvector
  • ***
  • Posts: 229
    • View Profile
Re: Why won't it compile for Android?
« Reply #6 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.

Offline caffeinekid

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
    • TCKSOFT
Re: Why won't it compile for Android?
« Reply #7 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.

MrTAToad

  • Guest
Re: Why won't it compile for Android?
« Reply #8 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)
« Last Edit: 2011-Sep-18 by MrTAToad »

Offline caffeinekid

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
    • TCKSOFT
Re: Why won't it compile for Android?
« Reply #9 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.

Offline Minion

  • Mr. Polyvector
  • ***
  • Posts: 229
    • View Profile
Re: Why won't it compile for Android?
« Reply #10 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

Offline caffeinekid

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
    • TCKSOFT
Re: Why won't it compile for Android?
« Reply #11 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.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Why won't it compile for Android?
« Reply #12 on: 2011-Sep-19 »
Yay, Caff is in da game!

Offline caffeinekid

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
    • TCKSOFT
Re: Why won't it compile for Android?
« Reply #13 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. :)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Why won't it compile for Android?
« Reply #14 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.