GoogleMap API V2 エラーについて

241 views
Skip to first unread message

Masami Arai

unread,
Jan 26, 2014, 7:11:08 AM1/26/14
to android-g...@googlegroups.com
私は初心者でVBAを多少使える程度の知識しかなく、AndroidでGoogleMapを表示させたいと書籍を頼りに入力してみたのですがエラーが大量に出てしまい、出版社に問い合わせても「問題ないはずだ」という回答しか得られず、困っております。

エラーは下記の通りです。
何かが根本的に間違っているのでしょうか?
動作は実機(XperiaZ1)で行っております。

01-26 20:48:56.441: D/dalvikvm(29649): Late-enabling CheckJNI
01-26 20:48:56.481: W/ActivityThread(29649): Application jp.co.sample.SampleMaproid can be debugged on port 8100...
01-26 20:48:56.521: D/AndroidRuntime(29649): Shutting down VM
01-26 20:48:56.521: W/dalvikvm(29649): threadid=1: thread exiting with uncaught exception (group=0x41ec2ae0)
01-26 20:48:56.531: E/AndroidRuntime(29649): FATAL EXCEPTION: main
01-26 20:48:56.531: E/AndroidRuntime(29649): java.lang.RuntimeException: Unable to start activity ComponentInfo{jp.co.sample.SampleMaproid/jp.co.sample.SampleMaproid.SampleMaproidActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class fragment
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2224)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2274)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.ActivityThread.access$600(ActivityThread.java:150)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1276)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.os.Handler.dispatchMessage(Handler.java:99)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.os.Looper.loop(Looper.java:213)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.ActivityThread.main(ActivityThread.java:5153)
01-26 20:48:56.531: E/AndroidRuntime(29649): at java.lang.reflect.Method.invokeNative(Native Method)
01-26 20:48:56.531: E/AndroidRuntime(29649): at java.lang.reflect.Method.invoke(Method.java:511)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:564)
01-26 20:48:56.531: E/AndroidRuntime(29649): at dalvik.system.NativeStart.main(Native Method)
01-26 20:48:56.531: E/AndroidRuntime(29649): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class fragment
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:277)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.Activity.setContentView(Activity.java:1881)
01-26 20:48:56.531: E/AndroidRuntime(29649): at jp.co.sample.SampleMaproid.SampleMaproidActivity.onCreate(SampleMaproidActivity.java:61)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.Activity.performCreate(Activity.java:5104)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2188)
01-26 20:48:56.531: E/AndroidRuntime(29649): ... 11 more
01-26 20:48:56.531: E/AndroidRuntime(29649): Caused by: 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" />
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.maps.internal.q.v(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.maps.internal.q.u(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.maps.MapFragment$b.cE(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.dynamic.a.a(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.app.Activity.onCreateView(Activity.java:4716)
01-26 20:48:56.531: E/AndroidRuntime(29649): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
01-26 20:48:56.531: E/AndroidRuntime(29649): ... 21 more



Tajima Kazuo

unread,
Jan 26, 2014, 4:13:47 PM1/26/14
to android-g...@googlegroups.com

原因はマニフェストファイルの設定ですね。
正しい引数を設定してくだざいという内容です。

: Caused by: 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" />

2014/01/26 21:11 "Masami Arai" <arai...@gmail.com>:
--
このメールは Google グループのグループ「日本Androidの会」の登録者に送られています。
このグループから退会し、メールの受信を停止するには、android-group-j...@googlegroups.com にメールを送信します。
このグループに投稿するには、android-g...@googlegroups.com にメールを送信してください。
http://groups.google.com/group/android-group-japan からこのグループにアクセスしてください。
その他のオプションについては、https://groups.google.com/groups/opt_out にアクセスしてください。
Reply all
Reply to author
Forward
0 new messages