Hi i am trying to solve this from quite sometime but not able to success
I am trying to initialize the variables in content provider as below
public static String rb_radio ;
public static String im_radio ;
static {
rb_radio = context.getResources().getString(R.string.kgs);
im_radio = context.getResources().getString(R.string.grams);
}
public AerProvider(Context ctx) {
super(ctx);
context = ctx;
i am setting rb_radio values for the resource folder as you can see but i am getting null pointer exception,below is my stack trace
10-09 16:38:40.265: E/AndroidRuntime(4114): Caused by: java.lang.NullPointerException
10-09 16:38:40.265: E/AndroidRuntime(4114):at com.in.android.aer.contentprovider.AerProvider.<clinit>(AerProvider.java:49)
Any help is appreciated