按下谷歌地图上的按钮时的ActivityNotFoundException

时间:2016-01-27 13:21:49

标签: google-maps android-fragments google-maps-markers activitynotfoundexception

enter image description here

按下谷歌地图上的按钮时,会发生此ActivityNotFoundException,

enter code here     android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:31.45133712274478,34.388197772204876?z=2.0&q=31.4513371,34.3881978(مسجد الفاروق) flg=0x10000000 pkg=com.google.android.apps.maps }
                                                   at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1660)
                                                   at android.app.Instrumentation.execStartActivity(Instrumentation.java:1430)
                                                   at android.app.ContextImpl.startActivity(ContextImpl.java:1396)
                                                   at android.app.ContextImpl.startActivity(ContextImpl.java:1378)
                                                   at android.content.ContextWrapper.startActivity(ContextWrapper.java:318)
                                                   at com.google.maps.api.android.lib6.e.eu.a(Unknown Source)
                                                   at com.google.maps.api.android.lib6.e.eu.a(Unknown Source)
                                                   at com.google.maps.api.android.lib6.e.ae.onClick(Unknown Source)
                                                   at android.view.View.performClick(View.java:4639)
                                                   at android.view.View$PerformClick.run(View.java:19252)
                                                   at android.os.Handler.handleCallback(Handler.java:733)
                                                   at android.os.Handler.dispatchMessage(Handler.java:95)
                                                   at android.os.Looper.loop(Looper.java:146)
                                                   at android.app.ActivityThread.main(ActivityThread.java:5511)
                                                   at java.lang.reflect.Method.invokeNative(Native Method)
                                                   at java.lang.reflect.Method.invoke(Method.java:515)
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
                                                   at dalvik.system.NativeStart.main(Native Method)

2 个答案:

答案 0 :(得分:2)

之所以发生这种情况,是因为我从Android手机上禁用了Google地图应用。谢谢大家。

答案 1 :(得分:0)

如果你看到这个或只是:

Fatal Exception: java.lang.NullPointerException
at com.google.maps.api.android.lib6.e.ae.onClick(Unknown Source)

你并不挑剔提供导航选项,然后删除它们可能是值得的:

gMap.getUiSettings().setMapToolbarEnabled(false);