| View previous topic :: View next topic |
| Author |
Message |
leke LXF regular

Joined: Mon Oct 22, 2007 6:45 pm Posts: 479 Location: Oulu, Finland
|
Posted: Wed May 04, 2011 7:18 pm Post subject: Got stuck with Android dev environment setup. |
|
|
Hi, I'm trying to get an Android development environment up and running. I'm following this guide and everything went smoothly until I got here...
| Quote: | At this point we need to install platforms and optional additional plug-ins or sample codes. Start Android SDK manager:
android-sdk-linux_86/tools/android
|
So I ran it like this...
| Quote: | asdf@asdf-laptop /opt/android-sdk-linux_x86/tools $ sudo bash android
SWT folder '/opt/android-sdk-linux_x86/tools/lib/#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb6f45dbc, pid=6396, tid=3067009904
#
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode, sharing linux-x86 )
# Problematic frame:
# V [libjvm.so+0x231dbc]
#
# An error report file with more information is saved as:
# /opt/android-sdk-linux_x86/tools/hs_err_pid6396.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#' does not exist.
Please export ANDROID_SWT to point to the folder containing swt.jar for your platform.
|
Err...Can anyone suggest what to do now?
Thanks. _________________ I codes here: http://notsure.tk |
|
| Back to top |
|
 |
ethernet LXF regular
Joined: Sat Oct 07, 2006 9:00 pm Posts: 170 Location: Ireland
|
Posted: Thu May 05, 2011 11:10 am Post subject: |
|
|
| It might be worth trying doing it through Eclipse (as per these steps). That worked for me. It takes ages for those components to download. |
|
| Back to top |
|
 |
leke LXF regular

Joined: Mon Oct 22, 2007 6:45 pm Posts: 479 Location: Oulu, Finland
|
Posted: Thu May 05, 2011 12:06 pm Post subject: |
|
|
| ethernet wrote: | | It might be worth trying doing it through Eclipse (as per these steps). That worked for me. It takes ages for those components to download. |
It's a similar guide. I've done everything up to...
Step 4. Adding Platforms and Other Components
...and get the error running the Android command from /tools
But thanks anyway  _________________ I codes here: http://notsure.tk |
|
| Back to top |
|
 |
ethernet LXF regular
Joined: Sat Oct 07, 2006 9:00 pm Posts: 170 Location: Ireland
|
Posted: Thu May 05, 2011 3:28 pm Post subject: |
|
|
What I meant is that you can also manage AVDs through Eclipse. Should invoke the same program in any case.
Any luck trying it without root privs?
cd to /path/to/android-sdk-whatever/tools/
and then launch ./android
The emulator is sooooo slow, you'll be happy *not* to get past this little error  |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7995 Location: Warrington, UK
|
Posted: Thu May 05, 2011 3:55 pm Post subject: Re: Got stuck with Android dev environment setup. |
|
|
| leke wrote: | | Quote: | Please export ANDROID_SWT to point to the folder containing swt.jar for your platform.
|
Err...Can anyone suggest what to do now?
Thanks. |
Have you tried doing what the error message suggested? _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
Bazza LXF regular

Joined: Sat Mar 21, 2009 11:16 am Posts: 1381 Location: Loughborough
|
Posted: Thu May 05, 2011 4:43 pm Post subject: |
|
|
I'd thought about this platform but......
......I have no idea what I could "develop" that hasn't already been done.
Also, not sure if I am capable of doing so in the first place. ;o( _________________ 73...
Bazza, G0LCU...
Team AMIGA... |
|
| Back to top |
|
 |
leke LXF regular

Joined: Mon Oct 22, 2007 6:45 pm Posts: 479 Location: Oulu, Finland
|
Posted: Thu May 05, 2011 5:21 pm Post subject: |
|
|
| Bazza wrote: | I'd thought about this platform but......
......I have no idea what I could "develop" that hasn't already been done.
Also, not sure if I am capable of doing so in the first place. ;o( | You just reinvent something. Angry Birds is just a reinvention of Yeti Sports with a lame storyline.
Oh, and if you google Yeti Sports, be warned, it involves cruelty to penguins.
My first effort will be a copy of Whack a mole, but with a twist
| ethernet wrote: | Any luck trying it without root privs?
cd to /path/to/android-sdk-whatever/tools/
and then launch ./android |
it worked! (wtf?).
| nelz wrote: | | Have you tried doing what the error message suggested? |
Didn't really understand what the error message was going on about, but I guess that part was telling me to change a path in some file called ANDROID_SWT to point to some other file called swt.jar, but no need now as it seems to be working. _________________ I codes here: http://notsure.tk |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7995 Location: Warrington, UK
|
Posted: Thu May 05, 2011 6:53 pm Post subject: |
|
|
The message was telling you to set the ANDROID_SWT environment variable to the directory containing that file, and then export it.
| Code: | locate swt.jar
export ANDROID_SWT="/path/from/above/" |
Have you rebooted since the problem occurred? It is possible the variable was defined, but not available in your existing environment. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
leke LXF regular

Joined: Mon Oct 22, 2007 6:45 pm Posts: 479 Location: Oulu, Finland
|
Posted: Thu May 05, 2011 9:50 pm Post subject: |
|
|
| nelz wrote: |
Have you rebooted since the problem occurred? It is possible the variable was defined, but not available in your existing environment. | Yep, i think so too. I can execute with sudo now too -- which I needed to do, to save the API I installed from the set up app.
It's times like these I miss the little windows nag, "Restart required. Restart now?"
@ethernet
Oh, and I see what you mean by the emulator being slow, OMG! _________________ I codes here: http://notsure.tk |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7995 Location: Warrington, UK
|
Posted: Fri May 06, 2011 12:05 am Post subject: |
|
|
Except you don't need to reboot to set a single variable, well, not in Linux. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
leke LXF regular

Joined: Mon Oct 22, 2007 6:45 pm Posts: 479 Location: Oulu, Finland
|
Posted: Sun May 08, 2011 1:12 pm Post subject: |
|
|
| nelz wrote: | | Except you don't need to reboot to set a single variable, well, not in Linux. | Would you have to possibly log out and then log back in again?
As for development, wow, the emulator is so slow to work with on my hardware, I'm not able to currently use it. I'm googling for other ways -- perhaps a way I can hook up my tablet and send code to it to execute. _________________ I codes here: http://notsure.tk |
|
| Back to top |
|
 |
ethernet LXF regular
Joined: Sat Oct 07, 2006 9:00 pm Posts: 170 Location: Ireland
|
Posted: Sun May 08, 2011 2:20 pm Post subject: |
|
|
If you can afford it, give a standard Android image 512 MB RAM. For a tablet, go for 1 GB, if possible.
Connect your Android device and run
| Code: | | /path/to/android-sdk/platform-tools/adb devices |
If it's detected here, Eclipse should launch the app on the physical device over launching the emulator, by default. You can double check this by right-clicking on your app in Eclipse --> Run As --> Run Configurations. Bring up the Target tab and ensure 'Automatic' is selected.
You also need to enable USB debugging on the device and allow installation of non-market (third-party) apps in the phone's preferences for this to work.
I had to write a udev rule on openSUSE 10.3 to detect a HTC Desire but then it 'just worked'. |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7995 Location: Warrington, UK
|
Posted: Sun May 08, 2011 6:57 pm Post subject: |
|
|
| leke wrote: | | nelz wrote: | | Except you don't need to reboot to set a single variable, well, not in Linux. | Would you have to possibly log out and then log back in again? |
No, although that would do it. All you actually need to do is what the message says, export the variable. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
leke LXF regular

Joined: Mon Oct 22, 2007 6:45 pm Posts: 479 Location: Oulu, Finland
|
Posted: Mon May 09, 2011 7:16 am Post subject: |
|
|
| nelz wrote: | | No, although that would do it. All you actually need to do is what the message says, export the variable. |
Ah, ok. I finally got it after I googled it, and it's what I know as, 'setting the path variable'.  _________________ I codes here: http://notsure.tk |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|