Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
brellakc
Posts: 19
Registered: ‎07-13-2011
My Device: Blackberry Bold 9000
My Carrier: At&T

Output: FRIDG: could not find image_1.png”.

Hi,

I'm using BlackBerry Java Plug-in for Eclipse - Version: 1.3.0 with BlackBerry_JDE_4_5_0.
This is the code I'm using:
Bitmap image0 = Bitmap.getBitmapResource("image_1.png");
BitmapField showImg = new BitmapField(image0); add(showImg );
The image is inside here: "ProjectName\res\img" .

I right clicked on the "img" folder and selected Build Path>Use as Source Folder.
I get this error in the Debugger: [0.0] FRIDG: could not find image_1.png”.
I've tried to move the image to the root of the src folder.
I tried multiple load strings too.
... Bitmap.getBitmapResource(“/image_1.png”);
... Bitmap.getBitmapResource(“img/image_1.png”);
... Bitmap.getBitmapResource(“res/img/image_1.png”);
... Bitmap.getBitmapResource(“/res/img/image_1.png”);
Nothing works.
Do I have the right version of Eclipse and JDE?
I can publish out hello world apps, so I'm assuming I have the right tools and settings.

Thanks
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Output: FRIDG: could not find image_1.png”.

In JDE (which is not Eclipse), you actually have to add the image file to the project.  Don't know how to do this in Eclipse

 

If you look inside the created jar file, you should see the image.  If you don't see it, then the file has not been added.

 

You should find it with just the file name and extension regardless of folder level (case has to be correct). 

Please use plain text.
Super Contributor
pp
Posts: 278
Registered: ‎11-04-2010
My Device: 4.5 and above
My Carrier: none

Re: Output: FRIDG: could not find image_1.png”.

Hi,

      Save that img folder under src folder and u can retrive just by specifying the name like

Bitmap image0 = Bitmap.getBitmapResource("image_1.png");

 

Project---- src folder--- img folder---image_1.png  and no need to select build path. because src will take care of that.

check whether it works.

 

Thanks & Regards

              pp

 

Please use plain text.
Contributor
brellakc
Posts: 19
Registered: ‎07-13-2011
My Device: Blackberry Bold 9000
My Carrier: At&T

Re: Output: FRIDG: could not find image_1.png”.

Thanks for the suggestions.

I've tried putting the img folder under src, I even tried moving the image into the root of the src, I keep getting the same error.

I was getting another error when I started the debugger. I assumed I was getting the error because the simulator was launching so Eclipse couldn't find it. Once the simulator launched the app would appear in it and it would run(except for the showing of the image part).


'Packaging Web Launcher' has encountered a problem.
An internal error occurred during: "Packaging Web Launcher".

Details >>
An internal error occurred during: "Packaging Web Launcher".
java.lang.NullPointerException

I've done some searches on this overlooked error and it looks like this could be something really simple that I did wrong in either the install of Eclipse the 4.5 jar or just the initial creating of the Blackberry project.

I've uninstalled and reinstalled everything a few times already because of the security settings on my computer and Eclipse originally being in the programming folder. I don't want to reinstall again until I know I have to and I know what I did wrong the first time.


Eclipse and the RIM folders are now on the root of my C drive.

I'm not sure if this matters but just in case, I'm working in Windows 7 Professional Service Pack 1 on a 32 bit OS
Please use plain text.
Contributor
Sonic_Spring
Posts: 35
Registered: ‎05-18-2011
My Device: BlackBerry 10 Dev Alpha, Blackberry 9700
My Carrier: -

Re: Output: FRIDG: could not find image_1.png”.

Hello!

Are your folder with images is present in "Java Build Path"->"Order and Export" and "Java Build Path"->"Source"?

Please use plain text.
Contributor
brellakc
Posts: 19
Registered: ‎07-13-2011
My Device: Blackberry Bold 9000
My Carrier: At&T

Re: Output: FRIDG: could not find image_1.png”.

I'm still not having any luck.

I've uninstalled all the JDEs and removed all the blackberry/eclipses and tried downloading and reinstalling BlackBerry_JDE_PluginFull and the BlackBerry_JDE_4.5.0.
I've tried the BlackBerry_JDE_PluginFull_1.3.0.201101051005-15 and the BlackBerry_JDE_PluginFull_1.3.0.201102031007-19. With BlackBerry_JDE_4.5.0 and BlackBerry_JDE_Components_4.5.0.

I noticed something weird with the apps in the simulators. I built a hello world app using the default hello world app project in eclipse when I started. That app has the hello world icon that's in the img folder. All the Blackberry apps I've created after that have a generic icon, that's not the icon in the img folder.

I've tried to recreate a hello world project to see if it would include the right icon but now it using the generic icon as well. I'm assuming there is a setting that was correct in the first app I created("hello world) that I must have turned off or changed since. I don't know why removing all eclipse files and uninstalling all the JDEs and reinstalling them hasn't reverted it back. I've even tried reinstalling the jdk-6u26-windows-i586.
Please use plain text.
New Member
erumawan
Posts: 1
Registered: ‎01-03-2013
My Device: 9300
My Carrier: Zong

Re: Output: FRIDG: could not find image_1.png”.

Clean and rebuild the project problem is solved

Please use plain text.