GLBasic forum

Main forum => Bug Reports => Topic started by: MrTAToad on 2012-Jan-13

Title: Android compiling not working
Post by: MrTAToad on 2012-Jan-13
I get :

Code (glbasic) Select
Exception in thread "main" java.lang.RuntimeException: Failed to create Q:\Compiler\platform\android\android-sdk-windows\add-ons.
at com.android.sdklib.SdkManager.loadAddOns(SdkManager.java:665)
at com.android.sdklib.SdkManager.createManager(SdkManager.java:144)
at com.android.sdkmanager.Main.parseSdk(Main.java:221)
at com.android.sdkmanager.Main.run(Main.java:118)
at com.android.sdkmanager.Main.main(Main.java:102)
Buildfile: build.xml does not exist!
Build failed


when trying to compile for Android.
Title: Re: Android compiling not working
Post by: Kitty Hello on 2012-Jan-16
since when? Did you try to clean&rebuild?
Title: Re: Android compiling not working
Post by: MrTAToad on 2012-Jan-16
Tried it after the last update and with a clean too...
Title: Re: Android compiling not working
Post by: Kitty Hello on 2012-Jan-16
Can you try to make an emtpy directory: compiler/platform/android/android-sdk-windows/add-ons
Title: Re: Android compiling not working
Post by: MrTAToad on 2012-Jan-16
yes, that worked
Title: build.xml missing
Post by: sf-in-sf on 2012-Apr-19

What's going on???

I'm re-installing everything, following all instructions in various forum posts.
Got GLb 10.231, install it on win7, and help->info says version 10.202. The bug of "no arrowdown" is still there.
I keep java properly installed, installed jdk, no problem.
java sdk installed in path with no blanks.

I adjusted the environment variables as described. (By the way, in win7, is it just system variable or also user variables?)

Erased the hkey_user....etc, re-entered the licence code.

Brand new project:

LOCAL a=1
a=a+6
END

then build for android:

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.104 SN:cc8796c9 - 3D, NET
Wordcount:2 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack RELEASE
Exception in thread "main" java.lang.RuntimeException: Failed to create Q:\Compiler\platform\android\android-sdk-windows\add-ons.
   at com.android.sdklib.SdkManager.loadAddOns(SdkManager.java:665)
   at com.android.sdklib.SdkManager.createManager(SdkManager.java:144)
   at com.android.sdkmanager.Main.parseSdk(Main.java:221)
   at com.android.sdkmanager.Main.run(Main.java:118)
   at com.android.sdkmanager.Main.main(Main.java:102)
Buildfile: build.xml does not exist!
Build failed
.
BUILD STAGE 2: Build DEBUG and install on device
Buildfile: build.xml does not exist!
Build failed
finished Android build-script.
Android=C:\GLBasic\test1\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 11.8 sec. Time: 16:59
Build: 1 succeeded.



"build.xml does not exist" is now a new error. How can i cure that?

Help!
Title: Re: Android compiling not working
Post by: Wampus on 2012-Apr-19
Try removing the Android folder from the distribute folder, cleaning the project by going to File -> Project -> Clean Up in the drop down menu of GLBasic IDE and compiling again. If you've made your own changes to AndroidManifest.xml back up the file then copy it across once compilation is complete. That should do it.
Title: Re: Android compiling not working
Post by: MrTAToad on 2012-Apr-19
And make sure the above directory is created!
Title: Re: Android compiling not working
Post by: sf-in-sf on 2012-Apr-30
Thanks Gernot, now it works. You said:

uninstall GLBasic, delete the directory C:\program files\GLBasic\. Reinstall now.
Now open the editor, press menu web/live-update. Perform update to the latest version.

Then look in your project. Is there an icon.png in the directory where the .gbap file is? If not, put one there. 512x512 is recomended.

Open your proejct now. Press the trashcan icon.
In menu project/options enter your company name and a project name. Don't use spaces, special chars and numbers here.

Now compile for Android again.

...and now it works; Many thanks!!!  :nw:

PS My tip of the day for the beginners, if anything stops to work:
I do a fresh win7 boot, connect the tablet or open the simulator, open a console and type "adb devices" or "adb usb", start GLbasic as administrator, then the automatic installation on the device/emulator does work from the IDE compilation for android. Nice job Gernot!  =D
Title: Re: Android compiling not working
Post by: Kitty Hello on 2012-May-08
Start editor as admin should not be required.
Title: Re: Android compiling not working
Post by: MrTAToad on 2012-May-08
I suspect some part of the Android or Java SDK is in "Program Files" - hence possibly the need for Administrator mode (as access to the directory would be limited).
Title: Re: Android compiling not working
Post by: quangdx on 2012-May-26
I too am getting the error.
BUILD STAGE 1: Compile and pack RELEASE
Exception in thread "main" java.lang.RuntimeException: Failed to create Q:\Compiler\platform\android\android-sdk-windows\add-ons.

MrTAToad suggested I create the folder manually, so I created c:\Program Files\Compiler\platform\android\android-sdk-windows\add-ons
unfortunately I am still getting the same error. Did I create the folder correctly? does that relate to the Q: drive?
I have also tried clicking on the trash can icon to clean the project. no joy :(
Title: Re: Android compiling not working
Post by: MrTAToad on 2012-May-26
You did call it "add-ons", didn't you ?  If so, that should work correctly.

I've included my add-ons directory, just in case...

[attachment deleted by admin]
Title: Re: Android compiling not working
Post by: quangdx on 2012-May-26
Many thanks for the reply,
I created it as - C:\Program Files\Compiler\platform\android\android-sdk-windows\add-ons
I don't even know how to access or find the Q: drive.

but I still get the same error

Code (glbasic) Select
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:25453a7d - 3D, NET
Wordcount:231 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack RELEASE
Exception in thread "main" java.lang.RuntimeException: Failed to create Q:\Compiler\platform\android\android-sdk-windows\add-ons.
at com.android.sdklib.SdkManager.loadAddOns(SdkManager.java:665)
at com.android.sdklib.SdkManager.createManager(SdkManager.java:144)
at com.android.sdkmanager.Main.parseSdk(Main.java:221)
at com.android.sdkmanager.Main.run(Main.java:118)
at com.android.sdkmanager.Main.main(Main.java:102)
Buildfile: build.xml does not exist!
Build failed
.
BUILD STAGE 2: Build DEBUG and install on device
Buildfile: build.xml does not exist!
Build failed
finished Android build-script.
Android=Z:\Dropbox\GLBasic\Cadbury\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 8.7 sec. Time: 21:27
Build: 1 succeeded.
Title: Re: Android compiling not working
Post by: MrTAToad on 2012-May-26
When compiling, can you open a command prompt, and then type in SUBST

It should then list where Q goes to :

C:\Users\Nicholas>subst
Q:\: => C:\Program Files (x86)\GLBasic_v11_beta

I have a feeling Q is not going to the correct place in your case...

The other thing is that permissions may not be correct. 

If needed, we could try TeamViewer
Title: Re: Android compiling not working
Post by: quangdx on 2012-May-27
when it's compiling for android and I type SUBST into command prompt,
I get nothing back.

So I set the SUBST file manually.
which still didn't work,
but then I finally worked out it is because I'm running under parallels, with my GLBasic projects in dropbox on the Mac side,
so they show up in windows as a network drive, and this was confusing it.
Moving the GLBasic project over to the C: drive and it now appears to be working.
Title: Re: Android compiling not working
Post by: MrTAToad on 2012-May-27
Ah, so it was some weird configuration :)  Glad its working now!
Title: Re: Android compiling not working
Post by: quangdx on 2012-May-27
Quote from: MrTAToad on 2012-May-27
Ah, so it was some weird configuration :)  Glad its working now!
Yeah, looks like Android SDK is very picky,
doesn't like names that start with numbers, or one with symbols or spaces in them.
And it really doesn't like networked drives.

Hopefully having it it iOS and Android will work in my favour for this Cadbury HackJam event.
Title: Re: Android compiling not working
Post by: MrTAToad on 2012-May-27
QuoteYeah, looks like Android SDK is very picky,
It is very picky!
Title: Re: Android compiling not working
Post by: ckrum on 2013-Sep-29
I have the same problem it seems.
I bought the book.. followed all the instructions..
still getting the same results..

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:3e3491bf - 3D, NET
Wordcount:53 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack RELEASE
Exception in thread "main" java.lang.RuntimeException: Failed to create Q:\Compiler\platform\android\android-sdk-windows\add-ons.
   at com.android.sdklib.SdkManager.loadAddOns(SdkManager.java:665)
   at com.android.sdklib.SdkManager.createManager(SdkManager.java:144)
   at com.android.sdkmanager.Main.parseSdk(Main.java:221)
   at com.android.sdkmanager.Main.run(Main.java:118)
   at com.android.sdkmanager.Main.main(Main.java:102)
Buildfile: build.xml does not exist!
Build failed
.
BUILD STAGE 2: Build DEBUG and install on device
Buildfile: build.xml does not exist!
Build failed
finished Android build-script.
Android=C:\Users\krumholt\Documents\GLBasic\textlotto1\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 3.9 sec. Time: 11:58
Build: 1 succeeded.
Title: Re: Android compiling not working
Post by: MrTAToad on 2013-Sep-30
Quite simple to fix : create the "add-on" directory in your "Compiler\platform\android\android-sdk-windows" directory
Title: Re: Android compiling not working
Post by: ckrum on 2013-Sep-30
I tried creating it under the SDK folder on drive C:\sdk\Compiler\platform\android\android-sdk-windows\add-ons

then I tried locating it in the root..

C:\Compiler\platform\android\android-sdk-windows\add-ons

I created drive letter Q and it just changed the error saying it cant created R:\....etc

by default add-ons was already in the path... C:\sdk\android-sdk\add-ons

The JDK SDK , AVD etc. works with other software .. this should be simple.. probably is .. but never for me. LOL
I will keep trying ..
Title: Re: Android compiling not working
Post by: kanonet on 2013-Sep-30
I think he means the GLBasic\Compiler\platform\android\android-sdk-windows folder, create there add-ons folder there and it should work.
BTW you dont need Android SDK, GLBasic+JDK is enough.
Title: Re: Android compiling not working
Post by: MrTAToad on 2013-Sep-30
Yes, it's in the GLBasic directory.

The latest/current beta I believe fixes this...  I had thought the latest release version did too as well...
Title: Re: Android compiling not working
Post by: ckrum on 2013-Sep-30
OMG .. finally I got it..
so the fix is ..
In the GLBASIC subfolder insure the following path exists..
C:\Program Files\GLBasic\Compiler\platform\android\android-sdk-windows\add-ons

FREAKIN AWESOME.. Now HahaHA.. 'EVIL LAUGH'

Thank you very much.