各位大神,我想把修改的图片保存在sdcard中,用文件保存,运行是没有报错,但是不能在sdcard不能生成新的文件,我也改了权限了,这是我的代码,您能帮我看下哪错了么,谢了哈~~~
上代码File myPictureFile = new File("/sdcard/newpicture.jpg");
  try{
BufferedOutputStream bos = new BufferedOutputStream (new FileOutputStream(myPictureFile));
  
bitmap.compress(Bitmap.CompressFormat.JPEG, 100,bos);
bos.flush();
bos.close();
  
}catch(Exception e){
Log.w(TAG,e);

解决方案 »

  1.   

    要看logcat..
    这个我怎么看的~新手见谅的哈
      

  2.   

    window-->show view-->other..-->Android-->LogCat
      

  3.   


    Windows-> Show View->Android->LogCat
      

  4.   

    adb shell
    ls -l
    看看sdcard 有读写权限吗?
      

  5.   

    File myfile = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "newpicture.jpg")  你这样试试