Android Slove getResources Error

Sol:

Context context = new Context(){/*...some code*/};

Then use this context get resources

context.getResources();