我到这里向我的 android 应用程序添加图像,但出现错误行:
String pathName = "chemistry\2013_03_26\chemistry1.pdf";//Error line
Resources res = getResources();
Bitmap bitmap = BitmapFactory.decodeFile(pathName);
BitmapDrawable bd = new BitmapDrawable(res, bitmap);
View view = findViewById(R.id.container);
view.setBackgroundDrawable(bd);