我做了一个短信接收的程序,可是只要已收到短信,程序就会被迫关闭,大家帮我找一下原因吧!
LOG为:
09-26 13:34:08.019: ERROR/AndroidRuntime(1461): FATAL EXCEPTION: main
09-26 13:34:08.019: ERROR/AndroidRuntime(1461): java.lang.RuntimeException: Unable to start receiver irdc.message.SMSreceiver: android.content.ActivityNotFoundException: Unable to find explicit activity class {irdc.message/irdc.message.SMSreceiver}; have you declared this activity in your AndroidManifest.xml?

解决方案 »

  1.   

    have you declared this activity in your AndroidManifest.xml?说的很清楚,Activity没有注册。
      

  2.   

    SMSreceiver没在AndroidManifest.xml中注册!
      

  3.   

    SMSReceiver这个广播接收器没有在AndroidManifest.xml文件注册,这样注册: <receiver android:name=".SMSReceiver">
    <intent-filter>
    <action android:name="android.provider.Telephony.SMS_RECEIVED" />
    </intent-filter>
    </receiver>
    action是android系统内置的action,你也应该用的这个action吧!
      

  4.   

    看看你的receriver里面是不是启动了没注册的activ
      

  5.   

    上面的".SMSReceiver"中的"."是什么意思?
      

  6.   

    少注册什么东西了。。SMSReceiver你在AndroidManifest.xml里面注册了吗?
      

  7.   

    android的activity和receiver在注册时都要加"."的,在名字的前面