Android SDK and Eclipse ADT on Fedora 16/15, CentOS/RHEL 6 - Comment Page: 1
This is guide howto install Android SDK Tools r16 and Eclipse ADT (Android Development Tools) Plugin on Fedora 16, Fedora 15, Fedora 14, Fedora 13, CentOS 6.2/6.1/6 and Red Hat (RHEL) 6.2/6.1/6.
This Guide Contents
1. Preparing Your Development Computer and Install Required softwares
2. Install Andoid SDK
3. Install ADT Plugin for Eclipse
4. Configure Eclipse and Install Latest Android SDK with AVD Manager
5. Create Simple Android Test Project
1. Preparing Your Development Computer and Install Required softwares
1.1 Install Sun/Oracle Java 7 JDK/JRE
1.2 Install Eclipse SDK 3.7 (Indigo)
2. Install Andoid SDK
2.1 Change root user
su -
## OR ##
sudo...
Great article, not knowing eclipse I was stuck at the Add Eclipse Helios repository step.
I think you missed a +R in “2.3 Add Write Permissions to /opt/android-sdk” ? Or use chown +R ?
Hi DAK,
Nice to hear that this was useful to you.
Yep, it was typo, I missed recursive for /opt/android-sdk directory. It’s corrected now. Thanks for correction!
Hi JR….
I have a problem and i dont known how to fix it……
I am thinking about..there are some more than ONE problem to fix…
The plataform…..Fedora 13 64 bits…..Eclipse Helios
in the preferenses->android….. in location text box…..i put the path of the Android SDK….but…
the IDE return me the following…
<>
Error Details: <>
thats is the first issue……..
then
in the standalone Android SDK and AVD maneger
-> Available Packages…in refresh…….i got:
<>
Thanks….From Resistencia, Chaco, ARGENTINA.
Hi JR….
I have a problem and i dont known how to fix it……
I am thinking about..there are some more than ONE problem to fix…
The plataform…..Fedora 13 64 bits…..Eclipse Helios
in the preferenses->android….. in location text box…..i put the path of the Android SDK….but…
the IDE return me the following…
‘Android SDK content loader’ has encountered a problem. parseSdkContent Failed
Error Details: parseSdkContent failed java.lang.NullPointerException
thats is the first issue……..
then
in the standalone Android SDK and AVD maneger
-> Available Packages…in refresh…….i got:
XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml.
Error: java.lang.NullPointerException
Thanks….From Resistencia, Chaco, ARGENTINA.
Hi Mariano,
What permissions you have Android SDK directory?
Please post output of following command here:
What Android SDK version are you using?
ls -la /opt/android-sdk
total 24
drwxrwxrwx. 5 mrno mrno 4096 Aug 19 06:41 .
drwxr-xr-x. 4 root root 4096 Aug 19 13:14 ..
drwxrwxrwx. 2 mrno mrno 4096 May 7 18:45 add-ons
drwxrwxrwx. 2 mrno mrno 4096 May 7 18:45 platforms
-rw-rw-rw-. 1 mrno mrno 828 May 7 18:45 SDK Readme.txt
drwxrwxrwx. 3 mrno mrno 4096 Aug 19 06:41 tools
i downloaded the sdk (android-sdk_r06-linux_86) one week ago
Thanks!
Hi Mariano,
Your permissions looks ok.
What Java version are you using?
Try following to fix that standalone Android SDK and AVD maneger error:
Create file ~/.android/androidtool.cfg
with following content:
And then start Android SDK and AVD maneger from command line.
Thanks for the tip on the 32-bit libraries! That was a big time-saver. Here’s another tip in case anyone has the same problem.
Everything seemed to install properly for me, but the emulator (virtual device) wouldn’t launch. There were no apparent errors, it just never showed the window when I clicked Start. I eventually saw these errors in /var/log/messages:
kernel: emulator[1454]: segfault at 1 ip 000000000094e987 sp 00000000ffba7638 error 4 in ld-2.12.so[937000+1e000]
abrt[1459]: saved core dump of pid 1454 (/stuff/projects/android/android-sdk-linux_86/tools/emulator) to /var/spool/abrt/ccpp-1282632703-1454.new/coredump (163823616 bytes)
abrtd: Directory ‘ccpp-1282632703-1454’ creation detected
abrtd: Executable ‘/stuff/projects/android/android-sdk-linux_86/tools/emulator’ doesn’t belong to any package
abrtd: Corrupted or bad crash /var/spool/abrt/ccpp-1282632703-1454 (res:4), deleting
It turned out to be an audio problem. The emulator was searching for any audio system it could use, but none were found, since it wanted a 32-bit one, and my system is 64-bit. I’m using ALSA, so I ran this command to fix it:
yum install alsa-lib.i686
If you’re not using alsa, run this command to see what the emulator supports:
cd tools
./emulator -help-audio-out
Hi Jason,
Nice to hear that this howto was useful to you.
And very nice tip, howto fix alsa sound problems on 64-bit system. This is certainly a useful tip to others who have the same problem. Thanks!
One more issue….
in the standalone Android SDK and AVD Manaeger–>Virtual Devices–> in the rigth panel…”no ADV available” in the target name colum and its alocate in the correct path ~/.android/avd
Hi mariano,
You have to first install Android Virtual Devices. Check “Available packages” tab and select at least one SDK. Example latest Android platform SDK Android Platfrom 2.2.
that is my second problem
in the standalone Android SDK and AVD maneger
-> Available Packages…in refresh…….i got:
XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml.
Error: java.lang.NullPointerException
the same error over the Eclipse Helios…..
this is not the first time that I install the Android Development Platform. I’ve never faced any problem with Eclipe Galileo installation..
Hi mariano,
Please, check your Java JDK version with following commands:
and
Solved!
I had to reinstall Java ……..
I had to upgrade to java 1.6…
before I had installed java 1.5
it seems strange to me that Fedora 13 has as default java 1.5
thanks!
Nice to hear that you got it working!
I have heard some problems with older Java versions…so that’s why I asked. :)
Hi Jr,
Thanks for the tips.
I got problem after installing ADT Plugin, I cant Configure Eclipse and Manage Android SDKs and Virtual Devices (AVD), when i go to Windows >> Preference, I didn’t see Android at the left panel. I don’t know what goes wrong.
Thanks
Deu
Hi deu,
Did you get any errors during ADT plugin installation?
And did you restarted Eclipse after ADT installation?
Jr,
The ADT Plugin installation run successfull without any error. Already restarted Eclipse, but still can’t see Android in the reference.
Try following (as root user):
Please post outputs here.
Here are the output:~
locate com.android:
locate com.android |grep jar |xargs ls -ls:
Everything looks ok, but some reason ADT Plugin it’s not working.
Next, I recommend to try uninstall ADT plugin -> restart Eclipse -> then reinstall ADT -> restart Eclipse.
If this does not help, then try to remove the ADT plugin -> start Eclipse as root user -> re-install the ADT plugin -> restart Eclipse as normal user.
Its works after i start eclipse as root user, I can install the plugin & can see Android in the Reference when start Eclipse as normal user. But I need to preceed with installation of all nedded SDKs as root user.
Thanks
I’ve heard previously about this problem, but I have never see this myself or find any decent explanation how this can occur…the ADT plugin installation is successful, but the Android stuff doesn’t show up.
But most importantly of course, that you got the ADT plugin work.
You’re welcome! :)
I had the same problem with Android not appearing, and installing as root solved it. Thanks!
Running current Gentoo with Galileo-r2 installed from the Eclipse site (had other issues with the package from Portage) if anyone cares enough to look into why this happens for some people.
I’ve this error on the command
run as...
:ifNotTrueThenFalse does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner in its AndroidManifest.xml
An idea ?
Thanks.
Hi cyrmeli,
Are you trying to run the entire project or just the .java file?
I have tried this example many times and it’s still working as it should.
I thought Helios is not recommended version? has the issue been fixed?
Hi tcmichals,
Yes you are right Eclipse 3.6 Helios is not recommended version, but I have not noticed any issues using Eclipse 3.6 and 3.6.1. Android SDK site recommend Eclipse 3.4 Ganymede and Eclipse 3.5 Galileo. So if you want play safe then it’s better install Eclipse 3.4 or 3.5.
Btw. this guide should works also with Eclipse 3.5 and Eclipse 3.4.
Thank you very much! Very neat tutorial – starting right from JDK till Android Test project. I couldn’t even get AVD running using my professor’s doc.
Thank you so much for this guide. !!