Transmission line method patterns were fabricated on AlGaAs/GaAs heterostructures to measure the effect of uniaxial stress on the heterojunction two-dimensional electron gas resistivity and the contact resistance. Uniaxial compressive stress was applied in the  and  directions of heterojunctions fabricated on (001)-oriented GaAs substrates. Fitting the measured data to a lumped resistor model yielded normalized sheet resistivity stress coefficients of -3.2%/kbar and 12.6%/kbar for stress in the  and  directions, respectively. From these coefficients we obtain a value for the piezoelectric constant e14 of Al0.4Ga0.6As to be -0.26 C/m2, which when linearly extrapolated to AlAs gives -0.40 C/m2 compared to the value -0.225 C/m2 calculated by Hübner [Phys. Status Solidi B 57, 627 (1973)].