无法处理android.intent.action.PACKAGE_ADDED,_REMOVED,_REPLACED

时间:2014-03-08 13:18:57

标签: android eclipse google-maps

我搜索并尝试了许多解决方案,但它们并不完美。 我正在使用Eclipse在Android应用程序上实现Google地图。 应用程序运行但LogCat中存在错误,如下所示:

03-08 06:39:54.876: E/Icing(942): Native load error: Native method not found: com.google.android.gms.icing.impl.NativeIndex.nativeGetVersionCode:()I
    03-08 07:51:07.916: E/Icing(942): Couldn't handle android.intent.action.PACKAGE_REMOVED intent due to initialization failure.
    03-08 07:51:13.246: E/Icing(942): Couldn't handle android.intent.action.PACKAGE_ADDED intent due to initialization failure.
    03-08 07:51:14.466: E/Icing(942): Couldn't handle android.intent.action.PACKAGE_REPLACED intent due to initialization failure.

我的清单文件“在应用程序标记中”:

 <receiver android:name="com.project.sbms.PackageChangeReceiver">
    <intent-filter>
        <action android:name="android.intent.action.PACKAGE_ADDED"/>
        <action android:name="android.intent.action.PACKAGE_REPLACED"/>
        <action android:name="android.intent.action.PACKAGE_REMOVED"/>
        <data android:scheme="package"/>
    </intent-filter>
</receiver>

PackageChangeReceiver类:

package com.project.sbms;

import android.content.*;
import android.net.Uri;
import android.util.Log;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;


public class PackageChangeReceiver extends BroadcastReceiver {
    private static final String TAG = "MainActivity";
    @Override
    public void onReceive(Context context, Intent arg1) {
        // TODO Auto-generated method stub
        Log.v(TAG, "there is a broadcast");
        }
    }

请帮助! 在此先感谢。

0 个答案:

没有答案