我的资产文件夹中有一张图片(welcome_image.jpg)。并使用此代码从资产中读取。
Bitmap bit = null;
String url = "/assets/welcome_image.jpg";
bit = BitmapFactory.decodeFile(url);
但位为空并抛出错误
03-26 16:42:15.303: D/Image exisits....(21547): Image url : /assets/welcome_image.jpg
03-26 16:44:39.853: E/BitmapFactory(21547): Unable to decode stream: java.io.FileNotFoundException: /assets/welcome_image.jpg: open failed: ENOENT (No such file or directory)
请告诉我如何实现这一目标。