当前位置:编程学习 > JAVA >>

在看android教学视频的时候出现的问题

ADT和SDK都是v20 的。(在com.edk.broadcastreciver包里mainactivity,还有一个是com.edk.myreciver包里的MyBroadcastReciver已经继承BroadcastReciver。
学习的是BroadcastReceiver的使用。报错的信息没看懂很长。

public class MyBroadcastReciver extends BroadcastReceiver
{
private static final String TAG ="MyBroadcastRecive";
@Override
public void onReceive(Context context, Intent intent)
{
Log.i(TAG, "MyBroadcastRecive");
}
}

......
</activity>
        <receiver
            android:name="com.edk.myreciver.MyBroadcastRecive"
            android:exported="false" >
            <intent-filter>
                <action android:name="com.edk.broadcastreciver.Action" />
            </intent-filter>
        </receiver>
    </application>
......




错误的提示信息是:Caused by: java.lang.ClassNotFoundException: com.edk.myreciver.MyBroadcastRecive in loader dalvik.system.PathClassLoader[/data/app/com.edk.broadcastreciver-1.apk]
补充:Java ,  Eclipse
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,