Ubuntu 11.04上搭建Android开发环境
2012-05-14 20:25
387 查看
本文给大家讲解下如何在Ubuntu 11.04环境下使用Eclipse, Android SDK和 PhoneGap搭建Android开发环境。
#1,安装Eclipse 和 Android SDK/PhoneGap所需软件包:
打开终端,输入下面命令完成题目所述过程:
打开网络浏览器,输入地址 http://developer.android.com/sdk/index.html,下载所需的平台(Win,Mac,Linux)的Android SDK版本。我们选择Linux(i386)即可(32位和64位平台皆适用)。
或者,用下面命令下载并解压文件包:
打开 ~/.profile文件
![](http://images.51cto.com/files/uploadimg/20110629/1027590.jpg)
接下来,选择左侧的“ Available packages ”,后选择右侧栏内的“ Android Repository”,选中所有“ Android Repository”组内的软件包,点击“安装所选软件包”即可。接下来选择“接受”,继续安装完毕即可。
若提示“ADB需要重启”时,我们选择“Yes”,重启ADB。
下载完毕后,点击“close”,关闭对话框。
#3,移植Android SDK到Eclipse
若是你用Eclipse创建Android应用,而非命令行下,则我们需要将移植Android SDK到Eclipse。
首先,从“Applications > Programming > Eclipse”,启动Eclipse。
接下来,请各位读者按照原文,自己调试即可@ 继续阅读
原文:http://www.bentutu.com/2011/06/ubuntu-11-04-setting-up-android-sdk/
----------------------------------------------------------------
other method is :
Use this website by Eclipse
https://dl-ssl.google.com/android/eclipse
- Add all the software
- after restart eclipse , it will remind you to add Android SDK , So choose the SDK platform.
- after install it , please modify profile and PAHT .
refer document
http://www.sigma.me/2011/04/29/linux-install-android-sdk.html http://farlee.info/archives/ubuntu-install-android-sdk-with-eclipse.html
------------------------------------------------------------------------------
ubuntu 64
Ubuntu 64位系统下eclipse运行报错:Failed to get the adb version ...
run this command : sudo apt-get install ia32-libs
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'lib32ncurses5-dev' has no installation candidate
E: Package 'ia32-libs' has no installation candidate
E: Unable to locate package lib32readline5-dev
E: Unable to locate package lib32z-dev
ia32-libs is in the universe component. It sounds like you don't have this repository enabled.
You need to enable it, either in Software Center -> Software Sources, or by editing /etc/apt/sources.list and uncommenting lines with universe at the end.
Don't forget to do an apt-get update (or press Update in Update Manager)
or
sudo apt-get install libncurses5-dev:i386
Link from : http://askubuntu.com/questions/81815/cant-install-lib32ncurses5-dev-or-ia32-libs /****************************/
apt-get update can update your apt download source
#1,安装Eclipse 和 Android SDK/PhoneGap所需软件包:
打开终端,输入下面命令完成题目所述过程:
sudo apt-get install openjdk-6-jdk eclipse ruby rubygems ruby-dev libnokogiri-ruby git ant libxml2 libxml2-dev libxslt1-dev若是64位,还需要安装下面两个软件包:
sudo apt-get install lib32stdc++6 ia32-libs JDK and Eclipse install guide . http://www.cnblogs.com/likwo/archive/2012/05/14/2499908.html#2,安装Android SDK
打开网络浏览器,输入地址 http://developer.android.com/sdk/index.html,下载所需的平台(Win,Mac,Linux)的Android SDK版本。我们选择Linux(i386)即可(32位和64位平台皆适用)。
或者,用下面命令下载并解压文件包:
cd ~ wget http://dl.google.com/android/android-sdk_r11-linux_x86.tgz tar xvfz android-sdk_r11-linux_x86.tgz由上述命令,我们可得到文件目录 android-sdk-linux_x86 ,现在我们要将$HOME/android-sdk-linux_x86/tools 目录 和 $HOME/android-sdk-linux_x86/platform-tools 目录添加到PATH 路径变量中去:
打开 ~/.profile文件
gedit ~/.profile添加下面一行内容到该文件末尾:
[...] PATH="$HOME/android-sdk-linux_x86/tools:$HOME/android-sdk-linux_x86/platform-tools:$PATH"然后,运行下面命令将上述改动生效:
export PATH="$HOME/android-sdk-linux_x86/tools:$HOME/android-sdk-linux_x86/platform-tools:$PATH"现在,启动 Android SDK:
android下图就是Android SDK所示:
![](http://images.51cto.com/files/uploadimg/20110629/1027590.jpg)
接下来,选择左侧的“ Available packages ”,后选择右侧栏内的“ Android Repository”,选中所有“ Android Repository”组内的软件包,点击“安装所选软件包”即可。接下来选择“接受”,继续安装完毕即可。
若提示“ADB需要重启”时,我们选择“Yes”,重启ADB。
下载完毕后,点击“close”,关闭对话框。
#3,移植Android SDK到Eclipse
若是你用Eclipse创建Android应用,而非命令行下,则我们需要将移植Android SDK到Eclipse。
首先,从“Applications > Programming > Eclipse”,启动Eclipse。
接下来,请各位读者按照原文,自己调试即可@ 继续阅读
原文:http://www.bentutu.com/2011/06/ubuntu-11-04-setting-up-android-sdk/
----------------------------------------------------------------
other method is :
Use this website by Eclipse
https://dl-ssl.google.com/android/eclipse
- Add all the software
- after restart eclipse , it will remind you to add Android SDK , So choose the SDK platform.
- after install it , please modify profile and PAHT .
refer document
http://www.sigma.me/2011/04/29/linux-install-android-sdk.html http://farlee.info/archives/ubuntu-install-android-sdk-with-eclipse.html
------------------------------------------------------------------------------
ubuntu 64
Ubuntu 64位系统下eclipse运行报错:Failed to get the adb version ...
run this command : sudo apt-get install ia32-libs
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'lib32ncurses5-dev' has no installation candidate
E: Package 'ia32-libs' has no installation candidate
E: Unable to locate package lib32readline5-dev
E: Unable to locate package lib32z-dev
ia32-libs is in the universe component. It sounds like you don't have this repository enabled.
You need to enable it, either in Software Center -> Software Sources, or by editing /etc/apt/sources.list and uncommenting lines with universe at the end.
Don't forget to do an apt-get update (or press Update in Update Manager)
or
sudo apt-get install libncurses5-dev:i386
Link from : http://askubuntu.com/questions/81815/cant-install-lib32ncurses5-dev-or-ia32-libs /****************************/
apt-get update can update your apt download source
相关文章推荐
- Ubuntu 11.04上搭建Android开发环境
- Ubuntu 11.04(64位)环境下Android开发环境搭建
- Ubuntu 11.04下用Eclipse搭建Android开发环境
- Android开发环境的搭建之一 ubuntu-11.04的安装
- android 学习笔记(二)Ubuntu 11.04 搭建Android开发环境
- Ubuntu 11.04上搭建Android开发环境
- 搭建Android开发环境 ( linux下 Ubuntu10.10 32bits 和 11.04 64bits 测验无问题)
- ubuntu 11.04下android开发环境的搭建!
- ubuntu 12.04(64位)下搭建android2.3/android4.2/4.1/4.0开发环境
- Ubuntu(64位)下,搭建Android开发环境
- Ubuntu 14.04下搭建 Android 开发环境(1) -JDK安装
- Android学习笔记(一):关于ubuntu环境下搭建Android开发环境
- ubuntu下android开发环境搭建(及错误异常处理)
- Ubuntu 10.10 与 华为C8650 手机搭建Android 真机开发调试环境
- ubuntu 12.04(64位)下搭建android2.3/android4.2/4.1/4.0开发环境
- ubuntu下Android开发环境搭建
- Ubuntu10.04下Android开发环境搭建
- Ubuntu搭建Android开发环境
- Ubuntu 14.04 安装搭建Android开发编译环境