problem with compiling with Android SDK 2.2

Previous topic - Next topic

funny_guy

Hello guys

I have following problem when I try to build for android (the description is between "****"):

****

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.074 SN:17179f9f - 3D, NET
Wordcount:4 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack
ERROR: SWT folder 'C:\Program Files (x86)\Android\android-sdk\tools\lib\x86_64' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
Buildfile: build.xml does not exist!
Build failed
BUILD STAGE 2: Install on device
Buildfile: build.xml does not exist!
Build failed
finished Android build-script.
Android=C:\DeT  err MIYT StoRe ROdmaPpE       ;-)\glbasic\gl basic projects\GLBasic\test\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 14.0 sec. Time: 20:10
Build: 1 succeeded.

****

Result: I don't get any .apk file produced  :rant:  :'(.

It says that my swt file is missing but if you you look at my attached (please do) you can se that it is there and environment variable is provided for it as well (the same goes for Java JDK SE (32MB) on my Win 7 (64MB). Java JDK SE, Android SDK 2.2 and GLBasic are installed in the chronological sequence they are written down here. they are all set to the compatibility mod Win XP SP2 (Alias 32 Mb/x86 - reason: "it allways works in 32MB"(or maybe I'm wrong)) and "Administrator rights" is checked.

Please help  :o :giveup: :sick: :nw: with any solution. And please make it in "for n00bs" style so I can get it from the start. Thank you in advance

[attachment deleted by admin]

MrTAToad

#1
Are you using the 32-bit Java SDK (should be version 1.6 and not 1.7 as that one has.. problems...) ?  The 64 bit version doesn't work...

In addition the Android SDK should be installed in a place with no spaces in

The environment settings should be something like :

ANDROID_SWT=C:\Android\android-sdk\tools\lib\x86
Path=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\MinGW\bin;C:\Program Files (x86)\Java\jdk1.6.0_25\bin;C:\Android\android-sdk\platform-tools;C:\Android\android-sdk\tools

funny_guy

Thank for for for a very quick reply.
I need to try it out then i'll post back

funny_guy

Thanks alot  :booze: it solved this problem when I installed JDK 1.6 and removed all spaces from the Android SDK "path".
But then I got this  :doubt:


_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.074 SN:17179f9f - 3D, NET
Wordcount:4 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...

BUILD FAILED
R:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:326: Value for 'genFolder' is not valid. It must resolve to a single path

Total time: 3 seconds
BUILD STAGE 2: Install on device
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...

BUILD FAILED
R:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:326: Value for 'genFolder' is not valid. It must resolve to a single path

Total time: 1 second
finished Android build-script.
Android=C:\DeT  err MIYT StoRe ROdmaPpE       ;-)\glbasic\gl basic projects\GLBasic\testy\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 18.5 sec. Time: 23:33
Build: 1 succeeded.


Wampus

Hmm. The code relevant to that bit is this:-

                <echo>Compiling aidl files into Java classes...</echo>
                <aidl executable="${aidl}" framework="${android.aidl}"
                        genFolder="${gen.absolute.dir}">
                    <source path="${source.absolute.dir}"/>
                    <source refid="project.libraries.src"/>
                </aidl>

Shot in the dark, try compiling from a directory that does not have ;-) in it. 'DeT  err MIYT StoRe ROdmaPpE       ;-)' is a bit weird, and while I don't see why it would be an issue, it might be.

MrTAToad

Android SDK is very strict about what it can use in file and directory paths - I suspect ;-) is a big no-no...

funny_guy

Ok. Now I've done something stupid...
I tried to compile my my project outside the folder with ";-)". And it actually succeeded. I did not get error message whle building and it did produce som files with .apk in the new folder. That's why I would like to thank you both for your help: now it actually worked on my computer. The problem was, that I didn't have the file "yep.apk" because I named my project "yep".
So I tried to solve it by myself which it showed I souldn't have done: I tried to change my projects directory/path so from ";-)" to something normal and boring like default. It "succeded" in creating it exept when I started the editor next time I couldn't use the option "new project": "ok"-button was not highlited (it was greyed out). Now how do I solve this problem. I did try to solve it by reinstalling GLBasic with new Projects Directory (Default Path: documents) but it didn't help.
what can I do?
Again what I really want is to install GLBasic SDK, choose a new Projects Folder, and afterwards be able to create New Project by default.

Should I download GLBasic from the net in order to rewrite previously downloaded package?
Should I do some registry cleaning (with Reg Cleaner): what files do I need to remove?
Should I ask Gernot to unregister me so I could reregister on this computer again?
Or should we try something else, completely sane and sound?

MrTAToad

I would completely uninstall GLBasic and get rid of the registry entries, default samples directory and program directory and then re-install it...

funny_guy

I tried to delete both folders: for SDK and project after I uninstalled it. Are the other direrectories I need to delete. What registry entries exactly are nneded to be deleted? What are their names end like  after HK_CLASSES_ROT\...?
Thanks man

Kitty Hello

HKEY_CURRENT_USER\Software\Dream_Design\GLBasic
Nothing on HKLM except the installer path suggestion.

funny_guy

Yes! :D It was registry entries. And now it did build. Hallelujah! Well almost. Me unthankful goat missing some executable.

My Android 2.2 Phone (Wildfire) is set to disc storage mode

I went through:

- the options: maximum array - 20, Console program - unchecked, Explicit decalrations - checked, build for - android, cmp - blank, Ink - blank, Maximum framerate - 60Hz, resulotion 320 - 480, Multisampling - 0. Pressed Apply, then Ok.

- Build multiplatform for Android - Ok

Result:
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.074 SN:17179f9f - 3D, NET
Wordcount:4 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
     [echo] Generating R.java / Manifest.java from the resources...
     [echo] Converting compiled files and external libraries into C:\Users\misforbruger\Documents\GLBasic\m\distribute\Android\bin\classes.dex...
     [echo] Packaging resources
     [echo] No key.store and key.alias properties found in build.properties.
     [echo] Please sign C:\Users\misforbruger\Documents\GLBasic\m\distribute\Android\bin\glbasic-unsigned.apk manually
     [echo] and run zipalign from the Android SDK tools.

BUILD SUCCESSFUL
Total time: 16 seconds
BUILD STAGE 2: Install on device
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
     [echo] Generating R.java / Manifest.java from the resources...
     [echo] Converting compiled files and external libraries into C:\Users\misforbruger\Documents\GLBasic\m\distribute\Android\bin\classes.dex...
     [echo] Packaging resources
     [echo] Running zip align on final apk...
     [echo] Debug Package: C:\Users\misforbruger\Documents\GLBasic\m\distribute\Android\bin\glbasic-debug.apk
     [echo] Installing C:\Users\misforbruger\Documents\GLBasic\m\distribute\Android\bin\glbasic-debug.apk onto default emulator or device...

BUILD FAILED
R:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:641: The following error occurred while executing this line:
R:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:271: exec returned: 1

Total time: 18 seconds
finished Android build-script.
Android=C:\Users\misforbruger\Documents\GLBasic\m\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 49.8 sec. Time: 18:29
Build: 1 succeeded.

*******************************************************************************

And then I don't have the executable for the Android.
BUILD FAILD - "what does this stupid computer want from me know" - from frustrated n00b

Did I connect my Adroid wrongly or did I  ajust it incorrectly?
And how do I envoke emulator(cmd line like thingy with android Icon on it): every time I try to start it it shows up, executes and exits?
And the last 2 follow up questions:
- What files do I need to transfer to or to find om my Android Device after the succesful build (when it happens)?
- Can I use shoebox or something else compressing/protecting/encripting everithing in one file to be played on android?

That the last requests  :nw:
Thank you for your patience

funny_guy

I don't know whether it's relevant but I didn't sign anything. I wanted to run the created app unsigned for pure test purposes,

MrTAToad

The second build failure can be ignored - it just means it can't actually be transfered to the device - but the APK file will have been created.

funny_guy

glbasic-debug.apk
glbasic-unsigned.apk
glbasic-debug-unaligned.apk

Those are the only apk files wich are created.
What must I do now?

MrTAToad

The preferred way is to install them from the Android device by using some file transfer program - you also need to make sure that third party installation is allowed.