为什么我有这个错误:
ERROR/AndroidRuntime(854): Uncaught handler: thread main exiting due to uncaught exception
ERROR/AndroidRuntime(854): java.lang.RuntimeException: Unable to instantiate receiver com.android.GPS21.SmsReceiver: java.lang.ClassNotFoundException: com.android.GPS21.SmsReceiver in loader dalvik.system.PathClassLoader@43d02ef0
ERROR/AndroidRuntime(854): Caused by: java.lang.ClassNotFoundException: com.android.GPS21.SmsReceiver in loader dalvik.system.PathClassLoader@43d02ef0
Run Code Online (Sandbox Code Playgroud)
这是我的onReceive事件:
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
Log.i(LOG_TAG, "Recieved a message");
if (intent.getAction().equals(ACTION)) {
// if(message starts with SMStretcher recognize BYTE)
StringBuilder sb = new StringBuilder();
// The SMS-Messages are 'hiding' within the extras of the Intent.
Bundle bundle = intent.getExtras();
if (bundle …Run Code Online (Sandbox Code Playgroud)