2009-12-11 09:27

Android开发,在 ubuntu 9.10 I386 上安装SDK ,NDK。

目标:ubuntu 9.10 上配置 Eclipse 可以调试 Android SDK , NDK
需要软件:
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/galileoto your update sites and try again.
也就是先addhttp://download.eclipse.org/releases/galileo
再addhttp://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 > project > android > open exits /android-ndk-1.6_r1/apps/hello-jni
而后 run as > Android Application

更多相关文章

  1. Ubuntu 10.04安装android NDK
  2. Android(安卓)ADT安装时卡在Calculating requirements and depen
  3. 关于Android(安卓)studio混淆遇到的问题
  4. android开发一 开发环境安装
  5. [Android]安装Android问题解决方案
  6. UBUNTU安装Android(安卓)Studio 3
  7. Android(安卓)Studio 安装ASM插件
  8. android studio ndk开发遇到的问题
  9. android studio 在windows 7环境下安装

随机推荐

  1. Android(安卓)自定义RadioButton或CheckB
  2. Android(安卓)NDK 开发教程三:Hello JNI
  3. Android杂谈---layout_x与layout_y的正确
  4. 《Android》Lesson21-广播+SharedPrefere
  5. ListView取消分割线
  6. Android(安卓)Retrofit 源码系列(一)~ 原理
  7. Android(java)学习笔记113:Android编写代码
  8. 13-4-4 android的SQLite功能应用
  9. android accessibility
  10. Android系统权限和root权限