Monday, 6 May 2013

How to handle this error? “Graphics acceleration error - BlackBerry 9900 Simulator”

I got this Erroe when run the Blackberry application:
Graphics acceleration error - BlackBerry 9900 Simulator
A problem was detected with your current graphics acceleration settings. An OpenGL 1.x+ compatible video card with recent video drivers is required for graphics acceleration. Please try a lower graphics acceleration setting by navigating to the view menu.
The simuator will now revert back to software rendering.
Could not create texture (err=0x501)
so to handle this error see steps:


Try the following:
Navigate to the folder where eclipse has installed. In my case it has installed on desktop. ie C:\Users\Username\Desktop\eclipse\ After this navigate to the plugin folder -> Blackberry Installed SDK folder -> Components -> Simulator. Then try to search for file fledge-settings.conf . Open this using Notepad or any editor. Add the below line
<BodyBuilder::opengl-acceleration>0</BodyBuilder::opengl-acceleration>
before </fledge-configuration> tag.
Path to navigate fledge-settings.conf file:
C:\Users\Username\Desktop\eclipse\plugins\net.rim.ejde.componentpack7.1.0_7.1.0.10\components\simulator

More Info see image: http://www.flickr.com/photos/48436294@N05/8354219539/

Get Started Developing for BlackBerry

Installation BlackBerry SDK Steps:
http://docs.blackberry.com/en/developers/deliverables/16874/index.html?name=Tutorial+-+BlackBerry+Java+Plug-in+for+Eclipse1.1&language=English&userType=21&category=BlackBerry+Java+Plug-in+for+Eclipse&subCategory=

Are you looking for BlackBerry application development tutorial.
Go to this site    https://developer.blackberry.com/java/download/   and Download  BlackBerry Java  7.1 SDK

Already have Eclipse?

  1. Choose Help > Install New Software.
  2. Click Add.
  3. For Location, type http://www.blackberry.com/developers/jar/win/java.
  4. For Name, type BlackBerry Java Plug-in Update Site.
  5. Click OK.
  6. Select BlackBerry Java Plug-in and at least one BlackBerry SDK.
    Choose the version of the BlackBerry SDK that is compatible with your intended target market.
    Read more about choosing the right Blackberry SDK versions.
  7. Click Next.
  8. Review the items being installed, and then click Next.
  9. Review the license agreement, and then check I accept the terms of the license agreement if you agree.
  10. Click Finish to begin the installation.
  11. After the plug-in is updated, you'll be prompted to restart Eclipse.

Don't have Eclipse installed?

No problem, you can download the full installer, which includes Eclipse 3.7, BlackBerry Plug-in for Eclipse 2.0.0 and the BlackBerry 7.1 SDK conveniently packaged in a single installer.
1.Double click on the downloaded file to install it.
Blackberry SDK setup


Blackberry SDK setup

2.Click next to proceed the installation

Blackberry SDK setup

3.Chose accept and click next.

Blackberry SDK setup

4.
Chose the destination place where you want to install the eclipse and click next.

Blackberry SDK setup

5.
If you do not want to create shortcut on desktop and programs means uncheck those check boxes and click next.

Blackberry SDK setup

6.
Click Install.

Blackberry SDK setup

Blackberry SDK setup

7.
Click Done.
Blackberry SDK setup

If you get this error message means you have to download the latest version of JRE and install and run the eclipse.
Blackberry SDK setup

Your eclipse will start like this.
Blackberry SDK setup

8.
Chose the destination folder for your workspace and click the check box to avoid this message on future use.
Blackberry SDK setup

9.Your eclipse will opens like this.
Blackberry SDK setup

Creating Hello World Project

Step 1

Click File -> New -> Blackberry Project

Blackberry SDK setup

if there BlackBerry Project not present then let do it..

Click File -> New -> Other -> Blackberry folder ->Blackberry Project


Step 2
Enter your project name and click Finish.
Blackberry SDK setup

Step 3
Create Package and Two java files into that package:
MyApp.java” and “MyScreen.java”. Here “MyApp.java” is your main application class and “MyScreen.java” is your application screen class.
Blackberry SDK setup

Step 4

Double click on the “MyApp.java” and replace the following code in it.
package mypackage;
import net.rim.device.api.ui.UiApplication;

public class MyApp extends UiApplication {
    public MyApp() {
    // TODO Auto-generated constructor stub
   this.pushScreen(new MyScreen());
   }

   public static void main(String[] args) {
    // TODO Auto-generated method stub

   MyApptheApp = new MyApp(); //Create an instance of this class
   theApp.enterEventDispatcher(); //attach an event Dispatcher
  }
}

Double click on the “MyScreen.java” and replace the following code in it.
package mypackage;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.*;

import net.rim.device.api.ui.container.MainScreen;

public class MyScreen extends MainScreen {

public MyScreen() {
// TODO Auto-generated constructor stub
LabelField title = new LabelField("First Application",
LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
setTitle(title);
add(new RichTextField("Hello World..! This is my first BB Application!\n _PRASHANT"));
add(new BasicEditField("Name:",""));  //for editbox

}
//dialog box when close the app
  public boolean onClose()
   {
     Dialog.alert("Goodbye!close it..?");
     System.exit(0);
     return true;
   }
}

Step 5
Right click on the screen and select Run As  BlackBerry Simulator

Blackberry SDK setup

Step 6
Your blackberry simulator will open like this.
Blackberry SDK setup

Step 7
Here click “All” and swipe or scroll down to your “HelloBlackBerry” application and click on it to open.
Blackberry SDK setup

Step 8
You can see the like this: