ANDROID的存档

Android Architecture

2008-04-18 3:03 am

system-architecture.jpg

推荐(0)
收藏
分享至: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 添加到饭否 QQ书签 POCO网摘 Digbuzz我挖网 

怎样学习Android

2008-04-15 9:31 pm

关于怎样学习Android,介绍两篇文章:

第一篇是 A developer's perspective on Google's Android SDK http://www.linuxdevices.com/articles/AT9900056470.html 

跟我一样英语不好的人有第二篇文章(中文的,不过那人也是对第一篇文章的一个总结):

http://www.androidin.com/android-846-1-1.html

然后就是学习资料了:

首先当然是官方的了 :http://code.google.com/android/

然后呢,一个好的东东当然要有强大的社区支持,找了一些看上去还不错的.

Androidin开发者论坛:http://www.androidin.com/

Android爱好者:http://www.loveandroid.com/

Android中文论坛:http://www.thegphone.com.cn/

阅读全文...

推荐(0)
收藏
分享至: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 添加到饭否 QQ书签 POCO网摘 Digbuzz我挖网 

Android的Hello,World

2008-04-14 11:43 pm

完成了配置后,开始了Android的学习。

先写一个hello,world吧。在这个过程中还是碰到了一些问题,主要是环境配置的问题。

至于怎么建立一个Android工程,就不在罗嗦了。在这记录一些问题。

新建工程后目录结构如下图:(我的工程是”StudyAndroid“)

snap8.gif

在建好一个工程后,必须为工程建立一个启动配置。方法是选择Run>Open Run Dialog ...然后选择左边类型中的Androdi Application点击新建(在左上角)。输入一个配置的名字。在project中选择你的Androdid工程。如图: snap2.gif

其他两个选择可以默认,不过最好是去common中设置一下编码。Target中也可以设置一下Screen size 和Netword Speed。不过默认就好了。。

2 还要记得去windws->Preferences,设置一下Android SDK 的目录,千万要记得不要加上tools。直接你的解压路径就好了,如我的是D:\workspace\android-sdk_m5-rc15_windows。今天就是多加了一个tools害我郁闷了半天。

snap5.gif

然后就是关于 emulator-tcp-5555 disconnected! Cancelling ...这个错误了,我刚开始一直不明白为什么. 后来才发现是自己太急了。写好代码后,run的时候记得选择如图:snap6.gif

之后,你要经过一段时间的等待,这个时候Android emulator正在启动(具体时间看你的配置了,我2G的内存启动了5分钟,汗死)千万不要关了Android emulator,不如就会有emulator-tcp-5555 disconnected! Cancelling...这个错误了。

接下来你会看到控制台出现如下信息,那么就ok了:

snap7.gif

附上:HelloWorld.java的代码,方便测试

package cn.wenjg;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloWorld extends Activity {
        /** Called when the activity is first created. */
       @Override
        public void onCreate(Bundle icicle) {
                super.onCreate(icicle);
               //setContentView(R.layout.main);
               TextView test = new TextView(this);
               test.setText("hello,android");
               setContentView(test);
       }
}

最后你就可以看到如下界面:

snap9.gif

再看看Android自带的Google Map,还有Google搜索引擎。搜了一下我的blog,哈哈。

googlemap.gif                     snap.gif

推荐(0)
收藏
分享至: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 添加到饭否 QQ书签 POCO网摘 Digbuzz我挖网 

Android开发环境配置

2008-04-14 10:58 pm

    下午上班的时候,全能的小郑经理在玩Android,我在旁边看了会也挺感兴趣的。晚上回家睡一觉起来,也决定开始学习一下Android。

那么什么是ANDROID呢,ANDROID是一个专用于移动设备的软件系统,它包括操作系统,中间件和关键应用,初略了解一下Android SDK提供必要的工具和API在Android平台上使用Java语言来开发应用程序……  不废话了,这些百度一下就可以了。

写blog是现在的一种好的学习方法,在完成学习后可以做个总结,把学习中遇到的一些问题记录下来,这样下次在看到就可以查一下了,也可以和大家一起学习。下面结合官网的资料,详细的写一下Android的开发环境配置。

1.System and Software Requirements

System: 我是在windows xp下安装的,当然还支持 Vista,Mac OS X 10.4.8 or later (x86 only),Linux (tested on Linux Ubuntu Dapper Drake) 。
Software Requirements:

Eclipse 3.2, 3.3 (Europa)
JDK 5 or JDK 6 (JRE alone is not sufficient)
Not compatible with Gnu Compiler for Java (gcj)
Android Development Tools plugin (optional)
2: Installing the SDK (安装SDK)

首先下载android sdk,http://code.google.com/android/download.html

然后直接解压到任意目录,如我解压的目录是“D:\workspace\android-sdk_m5-rc15_windows”。
接下来就是增加SDK的环境变量了。我的电脑->属性->高级->环境变量选择path,在后面加上“;youpath\tools”,你把“youpath”替换成你的解压路径就可以了,如我的:“;D:\workspace\android-sdk_m5-rc15_windows\tools”. 注意不要少掉“;”。

3. Installing the Eclipse Plugin (ADT) (安装eclipse插件)

这个官方写的很清楚,也很详细。我翻译一下。

To download and install the ADT plugin, follow the steps below.

(根据以下的步骤,下载和安装ADT插件)

  1. Start Eclipse, then select Help > Software Updates > Find and Install... (启动Eclipse,然后选择Help > Software Updates > Find and Install...)
  2. In the dialog that appears, select Search for new features to install and press Next.(在下一个对话框选择第二个选项:Search for new features to install,进入下一步)
  3. Press New Remote Site.(点击New Remote Site. )
  4. In the resulting dialog box, enter a name for the remote site (e.g. Android Plugin) and enter this as its URL:
    https://dl-ssl.google.com/android/eclipse/

    Press OK.(在name这个选项上输入remote site(如:Android Plugin),在url中输入https://dl-ssl.google.com/android/eclipse/)(接下来全部按默认就好了,就不翻译了。)

  5. You should now see the new site added to the search list (and checked). Press Finish.
  6. In the subsequent Search Results dialog box, select the checkbox for Android Plugin > Developer Tools. This will check both features: "Android Developer Tools", and "Android Editors". The Android Editors feature is optional, but recommended. If you choose to install it, you need the WST plugin mentioned earlier in this page. Now press Next.
  7. Read the license agreement and then select Accept terms of the license agreement, if appropriate. Press Next.
  8. Press Finish.
  9. The ADT plugin is not signed; you can accept the installation anyway by pressing Install All.
  10. Restart Eclipse.(重启Eclipse)
  11. After restart, update your Eclipse preferences to point to the SDK directory:
    1. Select Window > Preferences... to open the Preferences panel. (Mac OS X: Eclipse > Preferences)
    2. Select Android from the left panel.
    3. For the SDK Location in the main panel, press Browse... and locate the SDK directory.
    4. Press Apply, then OK.
      (重启完毕后,Window > Preferences >android选项   SDK Location选择你Android SDK解压路径. )   好了,Android的开发环境就配置好了。

下面就可以Android之旅了。还是从经典的Hello world开始学习。

推荐(0)
收藏
分享至: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 添加到饭否 QQ书签 POCO网摘 Digbuzz我挖网 

得到OpenID
使用OpenID提供商
35OpenID 35OpenID MyOpenID MyOpenID Flickr Flickr
Google Google Yahoo Yahoo! AOL AOL
Blogger Blogger LiveJournal LiveJournal Verisign Verisign
ClaimID ClaimID Technorati Technorati Vidoop Vidoop
OpenID OpenID 帮助