High-quality SnO2:Si films and SnO2:10 at.% Ga films were prepared by the solution method. The roughness of films is below 1.08 nm, and possess exceptional transparency (>75%) and decent semiconductor properties. Based on this, the SnO2:Si/SnO2: Ga homojunctions with different Si doping concentrations were prepared. It is found that the conductivity of the SnO2:Si thin film gradually increases, and the rectification characteristics of the homojunction are optimized with increasing Si doping content. The SnO2:15 at.% Si/SnO2:10 at.% Ga homogeneous junction has the best performance, the turn-on voltage is as low as 5.6 V, and it also exhibits good unidirectional conductivity. The photoresponse of the SnO2:15 at.% Si/SnO2:10 at.% Ga homojunction under the lights of red, yellow, and purple was explored respectively. The result shows that the device responds strongly to purple light. Compared with the test results in the dark environment, the device current increases by two orders, which is expected to be applied in the field of near-ultraviolet detection.