Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Got stuck with Android dev environment setup.

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
leke
LXF regular


Joined: Mon Oct 22, 2007 6:45 pm
Posts: 500
Location: Oulu, Finland

PostPosted: Wed May 04, 2011 7:18 pm    Post subject: Got stuck with Android dev environment setup. Reply with quote

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.cz.cc/
Back to top
View user's profile Send private message
ethernet
LXF regular


Joined: Sat Oct 07, 2006 9:00 pm
Posts: 170
Location: Ireland

PostPosted: Thu May 05, 2011 11:10 am    Post subject: Reply with quote

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
View user's profile Send private message
leke
LXF regular


Joined: Mon Oct 22, 2007 6:45 pm
Posts: 500
Location: Oulu, Finland

PostPosted: Thu May 05, 2011 12:06 pm    Post subject: Reply with quote

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 Wink
_________________
I codes here: http://notsure.cz.cc/
Back to top
View user's profile Send private message
ethernet
LXF regular


Joined: Sat Oct 07, 2006 9:00 pm
Posts: 170
Location: Ireland

PostPosted: Thu May 05, 2011 3:28 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8364
Location: Warrington, UK

PostPosted: Thu May 05, 2011 3:55 pm    Post subject: Re: Got stuck with Android dev environment setup. Reply with quote

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?
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
Bazza
LXF regular


Joined: Sat Mar 21, 2009 11:16 am
Posts: 1462
Location: Loughborough

PostPosted: Thu May 05, 2011 4:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
leke
LXF regular


Joined: Mon Oct 22, 2007 6:45 pm
Posts: 500
Location: Oulu, Finland

PostPosted: Thu May 05, 2011 5:21 pm    Post subject: Reply with quote

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 Wink

ethernet wrote:
Any luck trying it without root privs?
cd to /path/to/android-sdk-whatever/tools/
and then launch ./android

Surprised 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.cz.cc/
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8364
Location: Warrington, UK

PostPosted: Thu May 05, 2011 6:53 pm    Post subject: Reply with quote

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.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
leke
LXF regular


Joined: Mon Oct 22, 2007 6:45 pm
Posts: 500
Location: Oulu, Finland

PostPosted: Thu May 05, 2011 9:50 pm    Post subject: Reply with quote

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?" Rolling Eyes

@ethernet
Oh, and I see what you mean by the emulator being slow, OMG!
_________________
I codes here: http://notsure.cz.cc/
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8364
Location: Warrington, UK

PostPosted: Fri May 06, 2011 12:05 am    Post subject: Reply with quote

Except you don't need to reboot to set a single variable, well, not in Linux.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
leke
LXF regular


Joined: Mon Oct 22, 2007 6:45 pm
Posts: 500
Location: Oulu, Finland

PostPosted: Sun May 08, 2011 1:12 pm    Post subject: Reply with quote

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.cz.cc/
Back to top
View user's profile Send private message
ethernet
LXF regular


Joined: Sat Oct 07, 2006 9:00 pm
Posts: 170
Location: Ireland

PostPosted: Sun May 08, 2011 2:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8364
Location: Warrington, UK

PostPosted: Sun May 08, 2011 6:57 pm    Post subject: Reply with quote

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.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
leke
LXF regular


Joined: Mon Oct 22, 2007 6:45 pm
Posts: 500
Location: Oulu, Finland

PostPosted: Mon May 09, 2011 7:16 am    Post subject: Reply with quote

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'. Rolling Eyes
_________________
I codes here: http://notsure.cz.cc/
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast