Reputation: 771
I am getting Error while displaying bitmap file in my application. code:
Bitmap logoBitmap = Bitmap.getBitmapResource("res/icon.png");
BitmapField bitmapField1 = new BitmapField(logoBitmap, Field.FIELD_HCENTER);
add(bitmapField1);
Getting error in console tab. Error: Fridg:couldnot find res/icon.png.
I am using Eclipse with Blackberry Simulator 9700. I have added the folder and images and it is displaying in the tree of Eclipse.
Upvotes: 2
Views: 952
Reputation: 1575
The solution is to remove "res/" from source string, because it uses res as a source folder.
Upvotes: 4