Android compiling not working

Previous topic - Next topic

MrTAToad

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.

Kitty Hello

since when? Did you try to clean&rebuild?

MrTAToad

Tried it after the last update and with a clean too...

Kitty Hello

Can you try to make an emtpy directory: compiler/platform/android/android-sdk-windows/add-ons

MrTAToad


sf-in-sf


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!
On the day the atom is a cube I will start believing in the square pixel.

Wampus

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.

MrTAToad

And make sure the above directory is created!

sf-in-sf

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
On the day the atom is a cube I will start believing in the square pixel.

Kitty Hello

Start editor as admin should not be required.

MrTAToad

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).

quangdx

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 :(
Asobi tech - the science of play.
Spare time indiegame developer.

MrTAToad

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]

quangdx

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.
Asobi tech - the science of play.
Spare time indiegame developer.

MrTAToad

#14
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