android.content.ActivityNotFoundException:找不到处理Intent谷歌地图的活动

时间:2014-04-11 10:39:50

标签: android android-intent

我正在学习如何在Android应用中使用goolge地图。作为这一部分,我正在遵循课程。在那我发现了一个应用程序。此应用程序将使用用户地址作为输入,并使用意图在地图中显示其位置。我使用了一个buttion onclicklistner

button.setOnClickListener(new Button.OnClickListener() {
        @Override
        public void onClick(View v) {
            try {
                String address = addrText.getText().toString();
                address = address.replace(' ', '+');
                Intent geoIntent = new Intent(
                               android.content.Intent.ACTION_VIEW, Uri
                                       .parse("geo:0,0?q=" + address));
                startActivity(geoIntent);
            } catch (Exception e) {
                Log.e(TAG, e.toString());
            }
        }

我的清单文件          

<uses-sdk
    android:minSdkVersion="10"
    android:targetSdkVersion="17" >
</uses-sdk>

<application
    android:allowBackup="false"
    android:icon="@drawable/ic_launcher"
    android:label="MapLocation" >
    <activity
        android:name="course.examples.MapLocation.MapLocation">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
</manifest>

我的日志猫视图

04-12 18:28:46.446: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 18:28:46.636: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 18:28:46.886: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 18:28:47.975: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 18:28:49.055: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 18:28:49.217: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 18:28:49.885: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 18:28:50.265: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 18:58:17.797: I/dalvikvm(567): Jit: resizing JitTable from 512 to 1024
04-12 20:10:13.078: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 20:10:13.326: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 20:10:13.515: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }
04-12 20:10:14.396: E/MapLocation(567): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q= }

0 个答案:

没有答案