What are the Android Paths please...

Previous topic - Next topic

spicypixel

I have the JAVA_HOME and ANDROID_SWT set in my paths but they work and then they don't and then they do and then they don't???? Can someone please give some details as to what needs installing, what paths need setting please.

I'm spending more time messing with paths to get code compiling than I am coding, not right at all :) Even re-installing GLB to fix issues now is getting a ballache as the latest download is outdated and needs updating each time. Is there not a definitive guide that explains what's what?

BTW I get

Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:51e405f7 - 3D, NET
Wordcount:263 commands
compile+link:
*** create process failed
success
_______________________________________
*** Finished ***
Elapsed: 4.3 sec. Time: 22:29
Build: 1 succeeded.
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

Kitty Hello

No path variable. Just java_home. If the process fails that smells like missing libraries or so.
Did you install hava 32 bits?

MrTAToad

This is taken from my book - let me know if more information is needed :

QuoteCompiling for Android is not as straight forward as the other platforms, as it requires the downloading (for development purposes only) of two other SDK's – the Java SDK and Android SDK

The Java SDK can be found at http://www.oracle.com/technetwork/java/javase/downloads/index.html, whilst the Android SDK is at http://developer.android.com/sdk/index.html

The Java SDK (only use the 32-bit version) can be installed anywhere (and can have spaces in the path name), and needs to be done before the Android SDK is installed.

Once done, you will need to add JAVA_HOME environment variable to point to the directory containing the version.  So, for example, if the version 6.25 of the JDK was installed in C:\Program Files (x86)\Java, JAVA_HOME would be set to C:\Program Files (x86)\Java\jdk1.6.0_25

This path should also be appended to the PATH variable too

Once done, the Android SDK can now be installed.  This should do in a directory path that has no spaces (so the usual Program Files directory is out!).  Usually on the first run, it will say that the Java SDK couldn't be found, but if you click on BACK and then NEXT again, it will be magically okay.

Before installing, make sure everything is selected.

Once completed, you have one more environment variable to setup.  This is called ANDROID_SWT and should be set to the 32-bit version of swt.jar in the android-sdk\lib directory.  So, for example, if the Android SDK was installed in C:\Android, ANDROID_SWT would be set to C:\Android\android-sdk\tools\lib\x86

As a GLBasic program can run on an Android emulator, you may want to test your programs on that first.  It should be noted that a lot of extensions are not supported, so the display may not be the same as an actual device.

To install an application on the emulator, you use (assuming %PATH% points to the Android program directory) :

adb install your_application.apk

With your your_application.apk pointing to the APK file that you want installed.

You can also grab emulator screenshots if you run ddms before you start the emulator.

spicypixel

Im using 32 bit for the jdk and version 6 not 7. All was working then suddenly stopped. I re-install GLB, update to the latest and reboot. First run JAVA_HOME error. Look at environment variables, change nothing. Start GLB again, compile and all is fine. I'm beginning to think somewhere along the way there's a GLB issue especially as reinstalling GLB generally fixes it but I could be wrong.

Thank you for the anecdote from your book MrTaToad much appreciated and handy for myself and others.
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.