Google play ServiceでGoogle mapを使用するときにでたエラー解決法をメモ

「Google Maps APIの基本」を説明してくれているサイトを参考に作成していると例外が発生したので解決法。
http://codezine.jp/article/detail/7440

java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

meta-dataの定義をマニフェストファイルに追加する

Google Play Servicesのどこかのバージョンから以下を追加しないといけなくなった模様。
上記のエラーに書いてある通りに「You must have the following declaration within the」(必要な宣言がたりないよ)とでているのでその通りに追加してあげると良い

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

その他おすすめの備忘録

Tagged with:
 

コメントを残す