解决方案 »

  1.   

    这个是Activity类的代码,这个"currentPath"是从上个Activity传过来的,这里值是正常的。
    Intent it = getIntent();
    path = it.getStringExtra("currentPath");
    System.out.println("验证path:" + path);
    Intent itReceive = new Intent(InfoActivity.this,Receiver.class);
    itReceive.putExtra("curPath", path);
        pendIntent = PendingIntent.getBroadcast(InfoActivity.this,1,itReceive ,0);这个是BroadcastReceiver类的代码
    public void onReceive(Context context, Intent intent) {

    String strPath = intent.getStringExtra("curPath");
    System.out.println("删除路径:" + strPath);
    }
      

  2.   

     itReceive.putExtra("curPath", path);这里打印出来是啥 path
      

  3.   

    刚自己的试了一下,是一样的,估计传的path不对