Bitmap bmp =BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); Paint paint = new Paint(); paint.setColor(Color.BLACK); String str = "; Canvas canvas = new Canvas(bmp); //此句报错 canvas.drawText(str, , , paint); 不允许直接修改res里面的图片,只要在后面加上…