[Solved] Dynamic inflating gives me a nullexception

I’ve change the type of view to resolve the problem: I had… //View newGratLayout = LayoutInflater.from(getActivity()).inflate(R.layout.albaran_invoices_row, ll_invoices_layer, false); And now I had… RelativeLayout newGratLayout = (RelativeLayout)getActivity().getLayoutInflater().inflate(R.layout.albaran_invoices_row, null); //rl_albaran_invoices_row Thank for the people how try to help me. solved Dynamic inflating gives me a nullexception