2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Android SDK を最新の r22 にしたら、Xamarin.Android でビルドできなくなった件

Last updated at Posted at 2013-05-16

Google I/O 2013いろいろ発表があったので、試してみたくなるのがエンジニアってもんでしょう。

2013.5.19 追記

Xamarin.Android の 4.6.6 で Android SDK r22 に対応したので、この記事は無意味になりました。

image5

アップデート後、r22 でも無事ビルドできるようになりました。

1.Eclipse のエラー

Keynote から一夜明け、Android SDK を r22 に更新しました。
するとまず、昨日までビルドできていた Java の Android のプロジェクトがビルドできなくなりました。

この症状は、こちらのツイート:

に加えて、Eclipse の ADT Plugin を更新することで解決できました。(私の場合、<classpathentry〜 は行わなくても大丈夫でした。[勝手に追加されてました])

2.Xamarin.Android のエラー

やれやれと思ったところで、こんなツイートが。

「Google が SDK の場所を替えたので、Xamarin.Android は今壊れてる(意訳)」とのことです。

マジで?と思って、試してみると確かにビルド時にエラーががが。

image1

Error: Error executing tool '/…/android-sdk-macosx/platform-tools/aapt':

そして回避へ

先のトラブルで、「SDK Build-tools が新しく追加された」=「今までの場所にはもうない」、つまり、エラーになっているのは aapt(Android のパッケージ作成ツール) が意図した場所に存在しないからでは?と考えられます。

というわけで、 aapt はどこへ行ったのか、Android SDK のフォルダを Finder(エクスプローラ)で覗いてみます。

image2

むう、確かに /platform-tools の中には aapt は存在せず、代わりに /build-tools/17.0.0 の中にあります。

Xamarin Studio の設定で、aapt の場所を /build-tools に変更できれば良かったのですが、残念ながら見つけられず、仕方ないので /build-tools/17.0.0 配下のファイルとフォルダを、 /platform-tools にコピーしました。

image3

そして Xamarin Studio に戻り、もう一度ビルドを実行、無事ビルドできました。

image4

近いうちに Xamarin さん側で対応してくれると思いますが、それまでのつなぎとして。

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?