2011年10月28日金曜日

ADTプラグインのアップデート

最後です。

というか、SDKとADTがr.15に上がりやがりましたw
とはいえ、SDKとADTの依存性がr.15=r.15になったのと細かいバグフィックスだけみたいですね。それで15に上げるって、ほぼSDK15は欠番になりそうな気も。

それでは翻訳です。

ADTプラグインのアップデート

ADTプラグインの新しいリビジョンが利用可能になると、時折、新しい機能が追加されバグが修正されます。通常、ADTの新しいリビジョンが利用可能になったら都合が良い時になるべく早くアップデートすべきです。

ADTの新しいリビジョンはAndroid SDKツールの特定のリビジョンに依存関係を持つ場合もあります。そのような依存関係が存在する場合、ADTの新しいリビジョンをインストールした上でADKを構成するSDKツールをアップデートする必要があるでしょう。SDKツールをアップデートするにはSDKコンポーネントの追加に記載されているようにAndroid SDK and AVD Managerを利用します。

ADTの各バージョンの新機能やSDKつーるの依存関係について知りたければ、リビジョンの章を一覧をご確認下さい。現在のインストールバージョンを確認するにはEclipseのヘルプ>ソフトウェアのアップデートからインストールされているソフトウェアのウインドウを開いて、一覧から「Android Development Tools」のバージョンを参照します。

下記の手順からアップデートの利用が可能か確認して、可能であればインストールして下さい。
1.ヘルプ>更新の確認を選びます。
 もし、利用可能なアップデートがなければ、ダイアログにその旨表示されるので、それで完了です。
2.もしアップデートの利用が可能ならAndroid DDMS,Android Development Tools,Android Hierarchy Viewerを選んで次へを押します。
3.アップデートの詳細ダイアログが表示されるので次へを押下します。
4.ライセンス受諾を読んで受諾をせんたくしたら完了をクリックします。これでAndroid DDMSとAndroid Development Toolsの最新版のダウンロードとインストールが行われます。
5.Eclipseを再起動します。

もし、アップデート中に問題が発生したらEclipse内のADTプラグインを削除してから、ADTプラグインのインストールの指示に従ってインストールをやり直して下さい。

(英語本文)
Updating the ADT Plugin

From time to time, a new revision of the ADT Plugin becomes available, with new features and bug fixes. Generally, when a new revision of ADT is available, you should update to it as soon as convenient.

In some cases, a new revision of ADT will have a dependency on a specific revision of the Android SDK Tools. If such dependencies exist, you will need to update the SDK Tools component of the SDK after installing the new revision of ADT. To update the SDK Tools component, use the Android SDK and AVD Manager, as described in Adding SDK Components.

To learn about new features of each ADT revision and also any dependencies on the SDK Tools, see the listings in the Revisions section. To determine the version currently installed, open the Eclipse Installed Software window using Help > Software Updates and refer to the version listed for "Android Development Tools".

Follow the steps below to check whether an update is available and, if so, to install it.

Select Help > Check for Updates.
If there are no updates available, a dialog will say so and you're done.
If there are updates available, select Android DDMS, Android Development Tools, and Android Hierarchy Viewer, then click Next.
In the Update Details dialog, click Next.
Read and accept the license agreement and then click Finish. This will download and install the latest version of Android DDMS and Android Development Tools.
Restart Eclipse.
If you encounter problems during the update, remove the existing ADT plugin from Eclipse, then perform a fresh installation, using the instructions for Installing the ADT Plugin.

2011年10月26日水曜日

Android ExpandableListViewのIndicatorを消したい場合

ExpandableListViewのIndicatorが
親要素:setGroupIndicator(Drawable groupIndicator)
子要素:setChildIndicator(Drawable childIndicator)
で設定できるのはご存知だと思いますが、親はデフォルトで矢印(>とか)が
出てしまいます。

これ、子要素他の方法で示す場合、例えば子要素の数を明示的に表示したり
すると要らなかったりすると思います。その時、透過gifで透明の画像を
用意しないといけないのかな、と思ったのですが、setGroupIndicator(null)で
いけました。

NullPointer出るかな、と思ったんですが、大丈夫みたいです。

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.

2011年10月21日金曜日

iOSのWiFi

iPod touchをiOS5にアップグレードしたんですが、
WiFiが落ちて、検出できなくなりますね。

ネットでも同様の現象が起きてるようで、現状電源切って入れ直すしかないみたい。

電源切るのはスリープボタン+ホームボタン?(□)長押しで、電源切るかのスクロールが出るのでスクロールすればオッケー。
電源入れるときも2つ長押しです。

ADT14.0.0でエラー

ADTを14に上げて、Androidの設定項目選択すると
jfaceエラーが出て設定ができませんでした。

プラグイン "org.eclipse.jface" からのコードの起動で問題が発生しました。
詳細のstackTraceは最後に載せておきます。

これの解消法は
eclipse -clean
を実行して下さい。

Eclipseにeclipse-clean.cmdがあれば、それを叩けばOKでなければコマンドラインから実行して下さい。

その後、起動するとpluginの読み込みを行うので、読み込みが終われば正常に実行できます。

あー、こんなことで1.5日もはまってしまったOTL

[エラー詳細]:
java.lang.NoSuchMethodError: com.android.sdkuilib.internal.widgets.SdkTargetSelector.access$000(Lcom/android/sdkuilib/internal/widgets/SdkTargetSelector;)Z
at com.android.sdkuilib.internal.widgets.SdkTargetSelector$2.controlResized(SdkTargetSelector.java:259)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:222)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)
at org.eclipse.swt.widgets.Table.setDeferResize(Table.java:4064)
at org.eclipse.swt.widgets.Table.setBounds(Table.java:3944)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2742)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2738)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1145)
at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:854)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:899)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2742)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2738)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1145)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1534)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4019)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2313)
at org.eclipse.swt.widgets.Group.callWindowProc(Group.java:133)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:4751)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4029)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method)
at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1316)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2781)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:893)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2742)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2738)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1145)
at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:854)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:899)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2742)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2738)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1145)
at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:854)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:899)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2742)
at org.eclipse.swt.widgets.Control.setSize(Control.java:3256)
at org.eclipse.jface.preference.PreferenceDialog$PageLayout.layout(PreferenceDialog.java:124)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1145)
at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:854)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:899)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2742)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2738)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2805)
at org.eclipse.swt.custom.ScrolledCompositeLayout.layout(ScrolledCompositeLayout.java:109)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1145)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1534)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4019)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2405)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:4751)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4029)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method)
at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1316)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2781)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:893)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2742)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2738)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1145)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1534)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4019)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2405)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:4751)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4029)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4602)
at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:823)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:789)
at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1013)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1538)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4019)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2405)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:4751)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4029)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4602)
at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:823)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:789)
at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1013)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1538)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4019)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2405)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:4751)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4029)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:823)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:789)
at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1013)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1538)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4019)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2405)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:4751)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4029)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method)
at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1316)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2781)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:893)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2742)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2738)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1145)
at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:854)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:899)
at org.eclipse.swt.widgets.Decorations.setBounds(Decorations.java:859)
at org.eclipse.swt.widgets.Shell.setBounds(Shell.java:1456)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2742)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2738)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:2805)
at org.eclipse.jface.preference.PreferenceDialog.setShellSize(PreferenceDialog.java:1212)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1300)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:679)
at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:708)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:704)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:864)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:862)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1175)
at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1200)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:251)
at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:245)
at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:419)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3855)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3476)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

2011年10月20日木曜日

携帯電話

ADTインストール編の翻訳はまた明日です。

今日は帰りの電車で一つのシートに座ってる人全員が携帯をいじってました。
満員電車の中、立ちながら人に携帯押し付けて打ってる人もチラホラ。

便利なツールとか、面白いゲームを作って、どこかの誰かが少しだけ
いい時間を素敵な時間を過ごしてくれれば嬉しい。

でも、それに依存して、便利なことに判断や知識を任せて、考えることを
放棄してしまったら、ちょっと、悲しい。

いつしか、人の頭に携帯をセットして携帯に操作されて人が生きる日が
来るかも知れない。そんなことを考えてちょっとゾッとした。

思考停止が進むこの国で、僕らはどんな形でエンターテイメントを提供し、
そして、皆にとってハッピーな世の中にできるのだろう。

明日があなたにとって、今日より少しだけ良い日でありますように。

Android ADT14.0.0 Revision

リビジョン

この章はADTプラグインのリビジョン番号で示されたリリースの履歴メモです。

既存のADTの要約についてはhttp://tools.android.com/release/knownissues.をご参照下さい。

ADT 14.0.0(2011年10月)
バージョンの依存関係:
ADT14.0.0はSDKツールのリビジョン14のために設計されています。もし、まだSDKツールr14をインストールしていなかったら、「Android SDK and AVD Manager」を利用してインストールして下さい。

システム構築
・default.propertiesがproject.propertiesに、build.propertiesがant.propertiesに変更されました。変更が必要な場合、プロジェクトを開いたときにADTが自動的にリネームします。
・Eclipseでビルドされたプロジェクトのライブラリ化方法の変更
・出力フォルダのbinからbin/classesへの変更
・リソース編集によるビルド頻度を減らす改良。stringsファイルやlayoutファイル(idを追加した場合は除く)の編集ではビルドは走らなくなりました
・正常な保存の際にリソース編集の変更が起こらないように修正。実行時かデバッグ時(ADT12から導入されたパッケージ手順を省くビルドオプションが今回デフォルトになりました)にのみリソース編集が行われます。

 ビルドシステムの変更とその変更をサポートするのに必要な内容の詳細な概要はAndroidツールプロジェクトのサイトを御覧ください。
 

一般的な機能の改良
・Android開発環境の初期設定を補助するウェルカムウィザードの追加(詳細)
・ランチャーやメニューやタブなどのアイコン作成を補助するAndroid Asset Stadioの導入(詳細)

・Logcatビューの改良および、サポートディスプレイ(カーソル当てると出ます*)の追加、ログのフィルターにPID同様にアプリケーション名でのフィルタリング機能の追加(詳細)

・SDKマネージャーのUI変更(詳細)

・新規プロジェクトと新規XMLファイルのウィザードが複数ページに変更。サンプルプロジェクトは今回、元のファイルに影響なく変更や削除ができるようにワークスペースにコピーされます。(詳細)
・EclipseのGEFへの依存を解消


XMLエディターとJavaエディター
・標準のAndroidコーディング形式に沿ったXMLを整形する新しいフォーマッターの追加。
 フォーマッターでは推奨の順番に並べ直したり、レイアウトエディターで作成された変更の反映も出来ます。
 (詳細)
・XMLファイルのタグの開始と終了をジャンプできる「対応したタグへ進む」機能(Ctrl+Shift+P)を追加
・Mac版で「エンクロージング要素を選ぶ」機能のサポートを追加
・文字列に脱字が含まれている場合に文字列の抽出するクイックフィックスを追加
・XMLエディターでリターンキーを押した際に自動でインデントを編集する「スマートインデント」の改良

レイアウトエディター
・ドラッグのリサイズ操作中の情報表示を追加
 例えば、RelativeLayoutにドラッグした際、制約の指定を表示するとかリサイズしたときに変更されたサイズを見せたりします
 (詳細)
・忠実なレンダリングができない警告を表示しない設定の追加
 (詳細)
・「コンテナの削除」時にコンテナのトップレベルまでの子要素を削除し、必要があればネームスペースとレイアウトの属性を移行する視覚的なリファクタリングを追加
 (詳細)
・アウトラインからのメニューで親要素の設定ができるメニューを追加しました。これは子要素と親要素が紛れて自力で親要素を選択するのが難しい時に便利です。
・コンテキストメニューで設定にアクセスできる修正。
 ビューにたいてい設定する属性はメニューの一覧のトップにあります。
 その他の設定メニューでは最新で設定した属性へのアクセスでき、選択したビューで編集された項目のメニュー、レイアウトに関する属性のみのメニュー、全ての属性のアルファベット順のメニューがあります。
 (詳細:)
 
バグフィックス
・多数のバグが修正され、細かい改良がされています。特にLinuxでのクリティカルなバグが修正されました。

(原文)
Revisions

The sections below provide notes about successive releases of the ADT Plugin, as denoted by revision number.

For a summary of all known issues in ADT, see http://tools.android.com/release/knownissues.

ADT 14.0.0 (October 2011)
Dependencies:
ADT 14.0.0 is designed for use with SDK Tools r14. If you haven't already installed SDK Tools r14 into your SDK, use the Android SDK and AVD Manager to do so.
Build system
Changed default.properties to project.properties and build.properties to ant.properties. ADT automatically renames these files, if necessary, when you open a project in Eclipse.
Changed how library projects are built in Eclipse.
Changed output of javac from bin/ to bin/classes in Eclipse.
Improved incremental builds so that resource compilation runs less frequently. Builds no longer run when you edit strings or layouts (unless you add a new id) and no longer run once for each library project.
Introduced a "PNG crunch cache" that only runs on modified PNG files, instead of crunching all existing PNG files, all the time.
Modified resource compilation so it no longer happens for normal save operations. It only happens when running or debugging (the build option that lets you disable the packaging step, which was introduced in ADT 12, is now on by default.)
For a complete overview of the build system changes and what you need to do to support them, see the Android Tools Project site.
General improvements
Added a Welcome Wizard to help with the initial setup of the Android development environment (more info).
Integrated the Android Asset Studio, which helps you create icons for things like the launcher, menus, and tabs. (more info).
Revamped the Logcat view and added support to display and filter logs by application names as well as PIDs (more info).
Revamped the SDK Manager UI (more info).
Revamped the New Project and the New XML File wizards to have multiple pages. Sample projects are now copied into the workspace such that they can be modified and deleted without affecting the master copy (more info).
Removed the dependency on Eclipse GEF.
XML and Java editors
Added a new XML formatter that formats all XML files according to the standard Android coding style. The formatter can also reorder attributes to follow a recommended order and processes any changes made in the Layout editor. (more info).
Added the "Go to Matching" (Ctrl-Shift-P) feature, which lets you jump between opening and closing tags in XML files.
Added support for the "Select Enclosing Element" feature on Mac.
Added a Quickfix for extracting Strings when the caret is inside a String (see more).
Improved "smart indent", which allows automatic indentation and un-indentation when pressing the Return key in XML editors (more info).
Layout editor
Added tooltip feedback for dragging and resizing operations. For example, when dragging in a relative layout, the proposed constraints are shown. When resizing, the new dimensions are shown (more info).
Added the ability to suppress rendering fidelity warnings (more info).
Added "Remove Container" visual refactoring that removes the children of a container up to the top level and transfers namespace and layout attributes if necessary (more info).
Added pull-right menus to the context menu for accessing properties of the parents, which is useful when the children fully cover the parent and make it hard to select on their own.
Improved access to properties in the context menu. The most frequently set attributes for each view are listed at the top of the menu. The Properties menu offers access to the most recently set attributes, attributes organized by their defining view, and layout attributes only or all attributes alphabetically (more info).
Bug fixes
Fixed many bugs and added minor improvements, in particular some critical bug fixes on Linux.

Android ADT14.0.0 ADT Plugin for Eclipse

ADTがびっくりするくらい変更されてたから、訳してみました。
英語勉強中なので、表現おかしかったらご指摘下さい。

また、EclipseでのADTエラーは
こちらのエントリーを御覧ください。

Eclipse向けADTプラグイン

Eclipseの統合開発環境向けプラグインのAndroidの開発ツール(ADT)はAndroidのアプリケーションを作成する強力な環境を提供します。

ADTは新しいAndroidプロジェクトの準備やアプリケーションのUI制作、AndroidのフレームワークAPIを使ったコンポーネントの追加、SDKトールを使ったアプリケーションのデバッグ、アプリ配布のための署名済み(されない場合もあるけど)apkの出力機能をEplipseに提供します。

ADTを使ったEclipseでの開発を強く薦めます。それは開発を始める最速の方法です。
手順に従ってプロジェクトを構成したり、ツールの調整やカスタムされたXMLのエディターやデバッグの出力領域など、ADTはAndroidアプリケーション開発の力強い味方になります。

このドキュメントはEclipseの開発環境への、ADTプラグインのダウンロード方法、インストール方法を順番に説明していきます。ADTのインストール、使用の前にEclipseのIDEとインストール済みのAndroid SDKのバージョンが一致していないといけないので、注意して下さい。詳細はADTプラグインのインストール(http://developer.android.com/intl/ja/sdk/eclipse-adt.html#installing)以下をご参照下さい。

ADTをすでに利用しているなら、このドキュメントはADTを最新バージョンにアップデートするか、必要なら削除するための手順になります。

コードエディターやSDKツールの統合や(ドラッグ&ドロップで編集できる)視覚的なレイアウトエディターのようなADTプラグインで利用できる機能の情報はAndroid開発ツールのドキュメントをご参照下さい。

(原文)
ADT Plugin for Eclipse

Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications.

ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) .apk files in order to distribute your application.

Developing in Eclipse with ADT is highly recommended and is the fastest way to get started. With the guided project setup it provides, as well as tools integration, custom XML editors, and debug ouput pane, ADT gives you an incredible boost in developing Android applications.

This document provides step-by-step instructions on how to download the ADT plugin and install it into your Eclipse development environment. Note that before you can install or use ADT, you must have compatible versions of both the Eclipse IDE and the Android SDK installed. For details, make sure to read Installing the ADT Plugin, below.

2011年10月5日水曜日

全治

最近、周りが見えてない人多いですよね。

お客様は神様と勘違いした横柄な態度とか。
お客様はただの商品とかサービスを求めてる人で、士業とか一部は拒否できないけど、基本的に店員に売ってもらったりやってもらったりしないとそれを手にすることはできないわけで、対価でお金払ってるだけなんだよね。

元々、三波春夫が言った「お客様は神様です」はコンサートに来てくれるお客様、は神様でCD買ってくれるだけの人は別、とかだし。

コンビニでも売ってもらえなきゃ買えないし、それでも持って行けば犯罪になる。
全然客は偉くないです。むしろ、売ってくれたら感謝した方がいい。
海外とか普通にthank uとか言うでしょ。日本は客に甘過ぎる。だから客が堕落する。
本当は店員と客が一緒に成長できるのがいい店なんだろうけどね。

と、まあ、モンスターの話は置いといて(どうせ、言ってもモンスターは理解できないからモンスターなんだしw)、全治の話。
朝の番組で、駅員への暴力の特集やってて、当然、乗客はキチガイだらけなんだけど、いちいち全治表示が出るんですが、全治って、1ヶ月越えないなら出さない方がいいと思う。

経験者ならわかると思うけど、かすり傷でも全治1週間〜2週間です。
全治1週間の怪我を、とか言うと逆につまずいた程度の怪我か、って思ってしまう。
子供は毎日全治1〜2週間の怪我をしてくるわけで。演出上なんだけど、なんだかなー。

Android 突然ビルドできなくなる

先日、会社で突然Androidプロジェクト全部に×がついてビルドできなくなった。
そのEclipseのエラー表示はnullしか書いてなくてよくわからなかったけど、部署移動とかの関係でEclipseを複数入れていたので、別Eclipseで見たところ、Error generating final archive: Debug certificate expired on... のような表示が。

で、ググったら、例の如くyanzmさんのとこで。
http://y-anz-m.blogspot.com/2010/08/androiddebug-certificate-expired-on.html

どうやら、デバッグ(プロジェクト右クリックでAndroidで実行)の場合、キー作らないと思いますが、

  • Linux/Mac OSX だと、~/.android.
  • Windows XP だと、C:\Documents and Settings\\.android.
  • Windows Vista だと、C:\Users\\.android

にキーが自動で作られてるみたいです。
その名も「debug.keystore」

こいつが悪さしてたらしく、あんざいさんのとこでは時計いじって、とあったけど、もともとそんなことしてないから、削除すればいんじゃね?と削除したら動くようになりました。

あんざいさんの環境はPCデフォで英語みたいだし、その辺の影響?

これ、心当たりないのに突然起きるから、発生したときは落ち着いてサクってやって下さい。