ラベル Android の投稿を表示しています。 すべての投稿を表示
ラベル Android の投稿を表示しています。 すべての投稿を表示

2012年2月9日木曜日

Try reading android sample code

  • このエントリーをはてなブックマークに追加


Downloading the Sample Code
The SDK sample code is available to you as a set of downloadable SDK components, each of which contains the samples for a specific Android platform version. Once you have installed the SDK, you can download one or more samples component(s) into your SDK environment using the Android SDK and AVD Manager tool, which is pre-installed in the SDK.
To download the samples, launch the Android SDK and AVD Manager tool and select one of the samples components from the Available Packagespanel, for example "Samples for SDK API 7". Select Install Selected, verify and accept the download, then select Install Accepted to download the component into your SDK. If you aren't familiar with the Android SDK and AVD Manager and how to launch or use it, please read the Adding SDK Components document.
When the download is complete, you can find the samples sources on your computer in this location:
/samples/android-<level>/
You can easily create new Android projects with the downloaded samples, modify them if you'd like, and then run them on an emulator or device.
For example, if you are developing in Eclipse with the ADT Plugin, you can create a project for the "API Demos" sample app by starting a new Android Project, selecting "Create project from existing source", and then browsing to the /samples/android-<level>/ApiDemos directory (the samplesdirectory for the platform version you are using).
If you are not working in Eclipse, you can create a project for the API Demos sample using the android tool, by executing this command:
android update project -s -n API Demos -t  -p <path>samples/android-<level>/ApiDemos/

2012年1月30日月曜日

Android 開発環境の構築

  • このエントリーをはてなブックマークに追加


Android開発環境を構築してみた。

・JDKのインストール
http://java.sun.com/javase/ja/6/download.html へアクセスし、ダウンロードする

・Eclipseのインストール
http://mergedoc.sourceforge.jp/ から、Pleiades ー 日本語化されたEclipseをインストールする。
すでにEclipse本体がインストールされている場合は、Pleiadesのプラグインだけをインストールする。

・Android SDK
http://developer.android.com/sdk/index.html から AndroidのSDKをインストールする

・EclipseへAndroid プラグインをインストール
Ecplise起動後、[ヘルプ] - [新規ソフトウェアのインストール] 選択する
「作業対象」で「追加」クリックする
適当な名前を指定し、ロケーションに”https://dl-ssl.google.com/android/eclipse/”を入力する
Developer Toolsをチェックし、ダウンロードする
 ☆ダウンロードできない場合もあります。長い時間経っても、インストールが進まない状況です。
この時に、名前解決が出来ていない可能性があります。DNS等の設定を確認してください。

・EcpliseでAndroidの設定を行う
Ecplise起動、「ウィンドウ」→「設定」、「Android」をクリックし、右ペンのSDKロケーションにSDKの保存フォルダを参照する

・Androidアプリ開発に必要なPlatform APIのインストールを行う
Ecplise起動、「ウィンドウ」→「Android SDK and AVD Manager]を選択する。
[Installed Packages]選択し、[Update All...]ボタンクリックする。