2011年10月26日水曜日

ADTのインストール

元々エラーを解消したくて訳を始めたので、エラー解消して気合抜けちゃいましたw
3個目。インストールです。

ちなみに、エラーに関しては
1.eclipse -clean
2.SDKだけアップデート→ADTのインストール→1

でたいてい解決するかと。


ADTプラグインのインストール
この章はEclipse環境にADTをダウンロードし、インストールする手順を説明します。何か問題が起きたらトラブルシューティングの章をご確認下さい。

開発用PCでの準備


ADTはEclipseの統合開発環境向けのプラグインです。ADTの導入前に開発用コンピューターに適切なバージョンのEclipseをインストールして下さい。システム要求のドキュメントのAndroid SDKに合ったEclipseバージョンの一覧をご確認下さい。
・Eclipseがインストールされている場合、バージョンがADTとAndroidSDKに適しているか確認して下さい
・インストールかアップデートが必要な場合、こちらからダウンロードして下さい


 http://www.eclipse.org/downloads/

 「Eclipse Classic」バージョンがお薦めです。それ以外ならJavaかRCPバージョンのEclipseを使うと良いでしょう。

また、ADTを設定したり利用する前にDownloading the SDK Staeter Packageに書かれているAndroid SDKの開始パッケージをインストールする必要があります。
つまり、適当なバージョンのAndroid SDL Toolsと最低限開発プラットフォームを1つ用意する必要があります。ADTのインストールが簡単になるので、Android SDKをADTより先にインストールすることをお薦めします。

EclipseとAndroid SDKの準備ができたら、下記のADTインストール手順を行なって下さい。

ADTプラグインのダウンロード


Eclipseのアップデートマネージャー機能を使ってコンピューターにADTの最新リビジョンのインストールを行います。

上記のインストールの準備に記してEclipse IDEのリビジョンが適したものであれば、Eclipse環境へ下記の手順でダウンロードとインストールを行なって下さい。

1.Eclipseを立ち上げ、ヘルプ>新規ソフトウェアのインストールを選択
2.右上の「追加」を押下する
3.リポジトリ設定のダイアログが表示されるので"ADT Plugin"の名前で下記のURLロケーションを入力します


 https://dl-ssl.google.com/android/eclipse/

4.OKを押します。
 注記:もし、プラグインの取得に失敗したらURLを"https"から"http"に修正してみてください(httpsの方がセキュアですが)
5.インストール可能なソフトウェアのダイアログのDevelopers Toolsを選択して「次へ」を押下して下さい。
6.次のウインドウで、ダウンロードするトールの一覧が表示されるので「次へ」を押下して下さい。
7.ライセンス許諾を読んで、許諾するなら許諾を選び、「完了」を押して下さい。
8.インストールが終わったらEclipseを再起動します。

ADTプラグインの設定

上記の通り、ダウンロードが成功したら次はEclipseのAndroid SDKフォルダの指定をADTの設定で変更します。

1.ウインドウ>設定を選択肢、設定画面を開きます(Macの場合はEclipse>設定)
2.左のメニューからAndroidを選びます。
 Googleに統計情報の利用を送信するかのダイアログが出る場合があります。その場合、どうするか選択して、続行を押して下さい。続行を押すまで次には進めません。
3.SDKロケーションの欄で参照を押して、SDKをダウンロードしたディレクトリを選択します。
4.「適用」を押下後、「OK」を押します。

お疲れ様でした。ここまででエラーが出ていなければインストールは完了です。
Android SDKを初めてインストールした場合は、SDKのインストールを参考にセットアップを完了させて下さい。


ADTインストール トラブルシューティング

前述の手順通りにADTプラグインをダウンロードしようとして問題が起きた場合、こちらを御覧ください。

・EclipseがADTプラグインのリモートアップデートサイトを見つけられない場合、URLをhttpsからhttpに変更して下さい。
その際設定するロケーションは下記です。


 http://dl-ssl.google.com/android/eclipse/

・ファイヤーウォールの影響(企業でよくある)の場合、Exlipseのプロキシ設定が正しいかご確認下さい。Eclipseでプロキシ設定を確認するには、Exlipseのメニューのウインドウ(MacではEclipse)>設定>一般>ネットワークで確認できます。

それでもEclipseでADTプラグインがダウンロード出来ないなら、ADTのzipファイルをダウンロードして手動でインストールして下さい。

1.最新のADTプラグインのzipファイルは下記から入手できます(まだ解凍しないこと)。
NamePackageSizeMD5 Checksum
ADT 14.0.0ADT-14.0.0.zip6747816 bytes3883973cd229dc4336911117af949509
2.上記の標準のインストール手順の1,2を実行します。
3.サイトの追加ダイアログで「アーカイブ」を選択します。
4.画面で先程ダウンロードしたzipファイルを選択します。
5.自分の環境内でのサイト名(例えばAndroid Pluginとか)を名前欄に入力します。
6.OKを押します。
7.標準のインストール手順の4から先の残りの手順を実行します。

以前にアップデートの際、zipファイルを使ってインストールを利用していたら、これらの標準アップデート手順を再度実行する必要があります。

その他のインストールエラー

注記:ADTの特徴で他のいくつかのEclipseのコンポーネント(例えばWST)が必要です。ADTのインストール時にエラーが起きたら、Eclipseのインストールにこれらのコンポーネントが含まれていないためにエラーが起きた可能性があります。Eclipseのインストールに必要なコンポーネントを迅速に追加する方法の情報に関しては、ADTインストールエラー: "requires plug-in org.eclipse.wst.sse.ui"をご参照下さい。

Linuxユーザー向け

ADTプラグインのEclipseへのインストール時に下記エラーが起きたら

 An error occurred during provisioning.
 Cannot connect to keystore.
 JKS

その時は最適なJava VMが開発マシーンから欠如しています。Sun Java6をインストールすれば、この問題は解決するので、そのあとでADTプラグインを再インストールして下さい。


(英語原文)
Installing the ADT Plugin

The sections below provide instructions on how to download and install ADT into your Eclipse environment. If you encounter problems, see the Troubleshooting section.

Preparing Your Development Computer

ADT is a plugin for the Eclipse IDE. Before you can install or use ADT, you must have a compatible version of Eclipse installed on your development computer. Check the System Requirements document for a list of Eclipse versions that are compatible with the Android SDK.

If Eclipse is already installed on your computer, make sure that it is a version that is compatible with ADT and the Android SDK.
If you need to install or update Eclipse, you can download it from this location:
http://www.eclipse.org/downloads/
The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.
Additionally, before you can configure or use ADT, you must install the Android SDK starter package, as described in Downloading the SDK Starter Package. Specifically, you need to install a compatible version of the Android SDK Tools and at least one development platform. To simplify ADT setup, we recommend installing the Android SDK prior to installing ADT.

When your Eclipse and Android SDK environments are ready, continue with the ADT installation as described in the steps below.

Downloading the ADT Plugin

Use the Update Manager feature of your Eclipse installation to install the latest revision of ADT on your development computer.<>

Assuming that you have a compatible version of the Eclipse IDE installed, as described in Preparing for Installation, above, follow these steps to download the ADT plugin and install it in your Eclipse environment.

Start Eclipse, then select Help > Install New Software....
Click Add, in the top-right corner.
In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
https://dl-ssl.google.com/android/eclipse/
Click OK
Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
In the next window, you'll see a list of the tools to be downloaded. Click Next.
Read and accept the license agreements, then click Finish.
Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
When the installation completes, restart Eclipse.
Configuring the ADT Plugin

After you've successfully downloaded the ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
Select Android from the left panel.
You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed. You cannot continue with this procedure until you click Proceed.

For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
Click Apply, then OK.
Done! If you haven't encountered any problems, then the installation is complete. If you're installing the Android SDK for the first time, return to Installing the SDK to complete your setup.

Troubleshooting ADT Installation

If you are having trouble downloading the ADT plugin after following the steps above, here are some suggestions:

If Eclipse can not find the remote update site containing the ADT plugin, try changing the remote site URL to use http, rather than https. That is, set the Location for the remote site to:
http://dl-ssl.google.com/android/eclipse/
If you are behind a firewall (such as a corporate firewall), make sure that you have properly configured your proxy settings in Eclipse. In Eclipse, you can configure proxy information from the main Eclipse menu in Window (on Mac OS X, Eclipse) > Preferences > General > Network Connections.
If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT zip file to your local machine and manually install it:

Download the current ADT Plugin zip file from the table below (do not unpack it).
Name Package Size MD5 Checksum
ADT 14.0.0 ADT-14.0.0.zip 6747816 bytes 3883973cd229dc4336911117af949509
Follow steps 1 and 2 in the default install instructions (above).
In the Add Site dialog, click Archive.
Browse and select the downloaded zip file.
Enter a name for the local update site (e.g., "Android Plugin") in the "Name" field.
Click OK.
Follow the remaining procedures as listed for default installation above, starting from step 4.
To update your plugin once you've installed using the zip file, you will have to follow these steps again instead of the default update instructions.

Other install errors

Note that there are features of ADT that require some optional Eclipse components (for example, WST). If you encounter an error when installing ADT, your Eclipse installion might not include these components. For information about how to quickly add the necessary components to your Eclipse installation, see the troubleshooting topic ADT Installation Error: "requires plug-in org.eclipse.wst.sse.ui".

For Linux users

If you encounter this error when installing the ADT Plugin for Eclipse:

An error occurred during provisioning.
Cannot connect to keystore.
JKS
...then your development machine lacks a suitable Java VM. Installing Sun Java 6 will resolve this issue and you can then reinstall the ADT Plugin.

0 件のコメント:

コメントを投稿