请看这段代码:
final WallpaperManager wallpaperManager=WallpaperManager.getInstance(this);
     try{
Bitmap bmp=BitmapFactory.decodeResource(getResources(), R.drawable.pic1);
mImageView01.setImageBitmap(bmp);
wallpaperManager.setBitmap(bmp);
finish();
}
catch(IOException e){
 String msg = "设置桌面背景发生异常:" + e.getLocalizedMessage();
            Log.e(TAG, "设置桌面背景发生异常!", e);
            Toast.makeText(Imagedemo.this, msg, Toast.LENGTH_LONG).show();
}调试的时候执行完wallpaperManager.setBitmap(bmp);就提示source not found.
为了测试是否未找到pic1,我特地增加了mImageView01.setImageBitmap(bmp);这一句,说明bmp资源是没问题的
那是怎么回事?