简体   繁体   English

Android:StreetView意图导致ActivityNotFoundException

[英]Android:StreetView intent causing ActivityNotFoundException

I am trying to add streeview to my android application but I keep getting the following exception. 我试图将streeview添加到我的Android应用程序,但我一直得到以下异常。

01-06 18:35:35.810: E/AndroidRuntime(2497): FATAL EXCEPTION: main
01-06 18:35:35.810: E/AndroidRuntime(2497): java.lang.RuntimeException: Unable to start activity ComponentInfo{glasgo.activities/glasgo.activities.specific_event_activity$MapTab}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=google.streetview:cbll=55867650,-4257630&cbp=1,180,,0,1.0 }
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1768)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1598)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:654)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.widget.TabHost.setCurrentTab(TabHost.java:326)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:132)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:455)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.view.View.performClick(View.java:2502)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.view.View$PerformClick.run(View.java:9108)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.os.Handler.handleCallback(Handler.java:587)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.os.Handler.dispatchMessage(Handler.java:92)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.os.Looper.loop(Looper.java:130)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.ActivityThread.main(ActivityThread.java:3835)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at java.lang.reflect.Method.invokeNative(Native Method)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at java.lang.reflect.Method.invoke(Method.java:507)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at dalvik.system.NativeStart.main(Native Method)
01-06 18:35:35.810: E/AndroidRuntime(2497): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=google.streetview:cbll=55867650,-4257630&cbp=1,180,,0,1.0 }
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.Activity.startActivityFromChild(Activity.java:3067)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.Activity.startActivityForResult(Activity.java:2847)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.Activity.startActivity(Activity.java:2933)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at glasgo.activities.specific_event_activity$MapTab.onCreate(specific_event_activity.java:169)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-06 18:35:35.810: E/AndroidRuntime(2497):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)

I am using the GreenDroid library and my map view is within a static class which GreenDroid requires for to use it's tabs. 我正在使用GreenDroid库,我的地图视图位于GreenDroid要求使用它的选项卡所需的静态类中。

    public static class MapTab extends MapActivity {
    private MapController controller;
    private MapView mapView; 

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // code to get a map with zoom controls and double tap support
        setContentView(R.layout.map_with_zomm_and_tap);
        mapView = (MapView) findViewById(R.id.mapview);
        controller = mapView.getController();
        // some other code which runs fine

        Intent streetViewIntent = new Intent(Intent.ACTION_VIEW, Uri.parse 
                     ("google.streetview:cbll=55867650,-4257630&cbp=1,180,,0,1.0")); 
        startActivity(streetViewIntent); 
        }

I am currently just trying to make it display the street view and then I will create a button to toggle between street view and normal map view. 我目前只是想让它显示街景,然后我会创建一个按钮来在街景和普通地图视图之间切换。

I have a map key and am able to display the normal map view in my application in my manifest I have added uses-library android:name="com.google.android.maps" 我有一个地图键,能够在我的清单中显示我的应用程序中的法线贴图视图我添加了uses-library android:name =“com.google.android.maps”

Any help would greatly be appreciated. 任何帮助将不胜感激。

事实证明,这是因为StreetView没有安装在设备或模拟器上。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android ActivityNotFoundException意图 - Android ActivityNotFoundException Intent TextView android:autoLink =“ phone”调用android.intent.action.VIEW导致ActivityNotFoundException - TextView android:autoLink=“phone” calls android.intent.action.VIEW causing ActivityNotFoundException 简单 https URI 意图上的 Android ActivityNotFoundException - Android ActivityNotFoundException on simple https URI Intent 使用Intent的android.content.ActivityNotFoundException - android.content.ActivityNotFoundException using Intent [Android]context.startActvity(intent) 抛出 ActivityNotFoundException - [Android]context.startActvity(intent) throwing ActivityNotFoundException android.content.ActivityNotFoundException:将url传递给intent - android.content.ActivityNotFoundException: passing url to the intent 启动另一个活动时导致ActivityNotFoundException的操作意图 - Action Intent causing a ActivityNotFoundException while starting another activity Android Intent数据失败并且Intent解析返回ActivityNotFoundException - Android Intent data fails and intent resolution returns ActivityNotFoundException Android错误:“ android.content.ActivityNotFoundException:未找到用于处理Intent的活动” - Android error : “android.content.ActivityNotFoundException: No Activity found to handle Intent” Android:android.content.ActivityNotFoundException:找不到处理 Intent 的活动 - Android: android.content.ActivityNotFoundException: No Activity found to handle Intent
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM