Android开发,在 ubuntu 9.10 I386 上安装SDK ,NDK。
目标:ubuntu 9.10 上配置 Eclipse 可以调试 Android SDK , NDK <br>需要软件:
Linux ubuntu 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux
Eclipse 3.5.1
android-ndk-1.6_r1-linux-x86.zip
android-sdk_r04-linux_86.tgz
ADT 0.95
JDK 1.5 (官方建议1.5版本)
1.install JDK 1.5
ubuntu默认安装 OpenJDK ,我们需要安装sun-java5-jdk.
换用ubuntu 9.04 source.list
sudo apt-get install sun-java5-jdk
确认环境java -version
java version "1.5.0_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02)
Java HotSpot(TM) Client VM (build 1.5.0_19-b02, mixed mode, sharing)
2.install Eclipse
使用ubuntu 9.10 source.list
sudo apt-get install eclipse
//eclipse-pde will install eclipse-jdt
3.install ADT
eclipse help > software updates
add avaliable software > add site
http://dl-ssl.google.com/android/eclipse > install
可能会遇到bug ,这个是bug的解决方案。update 后即可解决。
Bug #482244 in eclipse (Ubuntu): “requires 'org.eclipse.gef 0.0.0' but it could not be found http://download.eclipse.org/releases/galileo to your update sites and try again.
也就是先add http://download.eclipse.org/releases/galileo
再add http://dl-ssl.google.com/android/eclipse
可以顺利完成安装
4. install Android SDK
download : sdk 1.6
解压缩 sdk
eclipse > windows > prefences > Android > SDK Location : set the path of the sdk1.6
sudo chmod a+w android-sdk-linux_86 -R
windows > Android SDK and AVD Manager > installed Package > update All > accept > installed accepted
windows > Android SDK and AVD Manager > Virtual Devices > New > target AVD
此时SDK已经安装完成了。
使用open > project > android project > open exist project ....
5.install NDK
解压缩 NDK
install NDK : cd $NDKROOT ./bulid/host-setup.sh
可能会遇到bug , 1.6NDK 中/host-setup.sh 文件 119 行
if [ "$result" == "Pass" ] ; then
改为 if [ "$result" = "Pass" ] ; then
此时设置好NDK 。
我们可以测试下 NDK 1.6
cd $NDKROOT
make APP=hello-jni
make clean APP=hello-jni
Android NDK: Building for application 'hello-jni'
Clean: hello-jni
asus@ubuntu:/opt/android-ndk-1.6_r1$ make APP=hello-jni
Android NDK: Building for application 'hello-jni'
Compile thumb : hello-jni <= apps/hello-jni/project/jni/hello-jni.c
SharedLibrary : libhello-jni.so
Install : libhello-jni.so => apps/hello-jni/project/libs/armeabi

此时,证明NDK 工作正常。
我们可以使用Eclipse > open &gt; project > android > open exits /android-ndk-1.6_r1/apps/hello-jni
而后 run as > Android Application

更多相关文章

  1. Android(安卓)APK应用安装原理(2)-查找APK并自动安装
  2. Eclipse搭建Android开发环境
  3. android开发环境搭建之我见myeclipse8.5 jdk1.6
  4. adb devices 找不到设备的解决方法
  5. Android(安卓)SDK和ADT介绍
  6. Android系统源代码下载
  7. Android(安卓)7.0 自动安装APK及拍照崩溃问题
  8. vue+cordova移动端Android开发环境配置
  9. Android(安卓)的source (需安装 git repo)

随机推荐

  1. Android(安卓)XML shape 标签使用详解(ap
  2. Android车轮之图片加载框架Android-Unive
  3. Android(安卓)即时音视频解决方案2——腾
  4. [Android]自定义View(一):坐标系
  5. Android(安卓)Studio SVN/Git之忽略文件
  6. 6.1、Android(安卓)Studio配置构建
  7. Android(安卓)RecyclerView中ViewHolder
  8. Win7+VS2010+cocos2d-x 2.1 Beta3+Sqlite
  9. Android(安卓)Studio加载慢/导入包慢/gra
  10. 小米上市,小菜带你聊聊小米