This work focuses on the void fraction measurement of gas–liquid two-phase flow by a 12-electrode contactless resistivity array sensor. Such a sensor, which can realize different excitation patterns, is developed here. Five different excitation patterns (with 1, 2, 3, 4 or 5 electrodes) and three two-phase distributions (bubble flow, stratified flow and annular flow) are investigated. Two data processing approaches, the data average method and the principal component regression (PCR) method, are used to establish models of void fraction measurement and hence to implement it. Experiments on void fraction measurement are carried out with the 12-electrode contactless resistivity array sensor. The results show that the void fraction measurement performances are different under different excitation patterns. Among the five different excitation patterns studied, the one with five electrodes has the best performance and the absolute values of void fraction measurement errors of the three two-phase distributions are all less than 5.0% (using the data average method) and 3.0% (using the PCR method). Research results indicate that the 5-electrode excitation pattern + PCR combination is a new effective way to implement void fraction measurement of gas–liquid two-phase flow with the 12-electrode contactless resistivity array sensor.