LoginSignup
13
15

More than 5 years have passed since last update.

eclipseでプッシュ通知実装していた人がandroid studioに乗り換えるときにつまずくこと

Last updated at Posted at 2014-06-02

前提

  • eclipseでAndroidアプリを作っていた
  • google play service SDKを使っていた
  • android studioをセットアップしたので、eclipseで作ったプロジェクトをimportしたい

どこでつまずくのか

このSet Up Google Play Service SDKをご覧いただくと、

Install the Google Play Service SDK
の項目の4ステップ目に、eclipseを使用する場合のみの設定が書かれている

google-play-service_libというプロジェクトをコピーしておいて、
プッシュ通知を利用するプロジェクトにリファレンスを設定するというもの。

この外部プロジェクトへのリファレンス設定があるeclipse製プロジェクトを、
Android Studioでimportしようとすると、
そんなプロジェクトないよ!ってエラーがでる。

そこで、eclipseで作成していたプロジェクトの中にある、
project.propertiesをテキストエディタで開いて、

以下の設定があれば削除する


android.library.reference.1=../google-play-services_lib

これを行えば、android studioへのインポートが可能になるはず。
では、android studioでgoogle play service を使う場合は
どうするのか

SDKマネージャーを開いて

  • Google Play Service SDK
  • Google Repository

をインストールする。
英語のドキュメント読んでいたら、
特に2つ目のGoogle Repositoryに気づかなくて、
ちょっとはまっていました。

へっぽこアプリエンジニアのつまずきポイントなんて、
みなさん華麗にスルーしているかもしれませんが、

誰かの役に立てれば幸いです。

(ちゃんと図とかいれようかなぁ。。。)

13
15
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
13
15