Multi parameter measurement and device miniaturization are the development trend of optical fiber sensors. Here we propose a compact dual channel surface plasmon resonance (SPR) fiber sensor which can measure the liquid refractive index (RI) and ambient temperature in real time. This sensor coats metal and polydimethylsiloxane (PDMS) on the side of a no-core D-shaped fiber: the channel for measuring the liquid RI is covered by silver film, and the channel for temperature sensing is covered by gold film and PDMS. The sensing sensitivity is analyzed by finite element method. When the liquid RI is within 1.33~1.44 and the temperature is within 0~180 °C, the corresponding maximum spectral sensitivity is 12530 nm/RIU and −3.465 nm/°C, respectively. The sensor has wide detection range, compact structure and temperature compensation function, which is suitable for environmental monitoring and high-precision sensing.