尝试在设备上使用谷歌地图时,应用程序崩溃

时间:2014-03-12 13:37:25

标签: android google-maps logcat

任何人都可以向我解释这个logcat报告,我试图使用谷歌地图,当我点击我的设备上的地图选项卡时,该应用程序失败并显示错误消息,“不幸的是,应用程序已停止工作' ?

03-12 13:34:19.998: E/AndroidRuntime(9464): FATAL EXCEPTION: main
03-12 13:34:19.998: E/AndroidRuntime(9464): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.softwaresearchapp/com.example.softwaresearchapp.MapsActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:2023)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:749)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.widget.TabHost.setCurrentTab(TabHost.java:413)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:154)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:546)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.view.View.performClick(View.java:4202)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.view.View$PerformClick.run(View.java:17340)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.os.Handler.handleCallback(Handler.java:725)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.os.Handler.dispatchMessage(Handler.java:92)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.os.Looper.loop(Looper.java:137)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.ActivityThread.main(ActivityThread.java:5039)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at java.lang.reflect.Method.invokeNative(Native Method)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at java.lang.reflect.Method.invoke(Method.java:511)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at dalvik.system.NativeStart.main(Native Method)
03-12 13:34:19.998: E/AndroidRuntime(9464): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.Activity.setContentView(Activity.java:1881)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at com.example.softwaresearchapp.MapsActivity.onCreate(MapsActivity.java:12)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.Activity.performCreate(Activity.java:5104)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
03-12 13:34:19.998: E/AndroidRuntime(9464):     ... 18 more
03-12 13:34:19.998: E/AndroidRuntime(9464): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.google.android.gms.maps.MapFragment: make sure class name exists, is public, and has an empty constructor that is public
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.Fragment.instantiate(Fragment.java:592)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.Fragment.instantiate(Fragment.java:560)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.Activity.onCreateView(Activity.java:4709)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
03-12 13:34:19.998: E/AndroidRuntime(9464):     ... 27 more
03-12 13:34:19.998: E/AndroidRuntime(9464): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.maps.MapFragment" on path: /data/app/com.example.softwaresearchapp-1.apk
03-12 13:34:19.998: E/AndroidRuntime(9464):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
03-12 13:34:19.998: E/AndroidRuntime(9464):     at android.app.Fragment.instantiate(Fragment.java:582)
03-12 13:34:19.998: E/AndroidRuntime(9464):     ... 30 more

0 个答案:

没有答案