We use first-principles calculations, at the density-functional-theory (DFT) and GW levels, to study both the electron-phonon interaction for acoustic phonons and the "synthetic" vector potential induced by a strain deformation (responsible for an effective magnetic field in case of a nonuniform strain). In particular, the interactions between electrons and acoustic phonon modes, the so-called gauge-field and deformation potential, are calculated at the DFT level in the framework of linear response. The zero-momentum limit of acoustic phonons is interpreted as a strain of the crystal unit cell, allowing the calculation of the acoustic gauge-field parameter (synthetic vector potential) within the GW approximation as well. We find that using an accurate model for the polarizations of the acoustic phonon modes is crucial to obtain correct numerical results. Similarly, in the presence of a strain deformation, the relaxation of atomic internal coordinates cannot be neglected. The role of electronic screening on the electron-phonon matrix elements is carefully investigated. We then solve the Boltzmann equation semianalytically in graphene, including both acoustic and optical phonon scattering. We show that, in the Bloch-Gruneisen and equipartition regimes, the electronic transport is mainly ruled by the unscreened acoustic gauge field, while the contribution due to the deformation potential is negligible and strongly screened. We show that the contribution of acoustic phonons to resistivity is doping and substrate independent, in agreement with experimental observations. The first-principles calculations, even at the GW level, underestimate this contribution to resistivity by approximate to 30%. At high temperature (T > 270 K), the calculated resistivity underestimates the experimental one more severely, the underestimation being larger at lower doping. We show that, besides remote phonon scattering, a possible explanation for this disagreement is the electron-electron interaction that strongly renormalizes the coupling to intrinsic optical-phonon modes. Finally, after discussing the validity of the Matthiessen rule in graphene, we derive simplified forms of the Boltzmann equation in the presence of impurities and in a restricted range of temperatures. These simplified analytical solutions allow us the extract the coupling to acoustic phonons, related to the strain-induced synthetic vector potential, directly from experimental data.