getResouces是Context的方法。因此,您可以将上下文传递给DbAdapter构造函数并
getResources从中调用:
public DbAdapter(Context context) { Resources res = context.getResources();//error: The method getResources() is undefined for the type DbAdapter //also tied context.getResources()}


