I generally finish painting before applying the gear, using small bit's of blu-tack to mask the gear attachment points. I do the same with the gear & assemble it as far as is possible before leaving it as one of the last thing to get done - take care when joining the wheels to the gear, as there is often room for misalignment between strut & wheel.
With the model on it's back I'll dry fit the gear to check for any issues & then glue in place & use lumps & "sticks" of blu-tack to support the gear, check alignment using a ruler, make adjustments if required & then leave overnight.
If the wheels have flat spots, lay something flat & light over then to check the alignment.
If I'm overenthusiastic when masking the gear location points with blu-tack (or cack handed with the glue), there may be some touching up to do, but it's usually not much if any.