With the extensive integration of portable computers and smartphones with " Internet of Things" technology, further miniaturization, high reading/writing speed and big storage capacity are required for the new-generation non-volatile memory devices. Compared with traditional charge memory and magnetoresistive memory, resistive random access memory (RRAM) based on transition metal oxides is one of the promising candidates due to its low power consumption, small footprint, high stack ability, fast switching speed and multi-level storage capacity. Inspired by the excellent resistive switching characteristics of NiO and HfO2, NiOx films are deposited by magnetron sputtering on the Pt < 111 > layer and the polycrystalline HfO2 film, respectively. Their microstructures, resistive switching characteristics and conductive mechanisms are studied. X-ray diffractometer data show the < 111 > preferred orientation for the NiOx film deposited on the Pt < 111 > layer but the < 100 > preferred one for the film deposited on the polycrystalline HfO2 layer. X-ray photoelectron depth profile of Ni 2p core level reveals that the NiOx film is the mixture of oxygen-deficient NiO and Ni2O3. NiOx(111) films show bipolar resistive switching (RS) characteristics with a clockwise current-voltage (I-V) loop, but its ratio of the high resistance to the low resistance (R-H/R-L) is only similar to 10, and its endurance is also poor. The NiOx(200)/HfO2 stack exhibits bipolar RS characteristics with a counterclockwise I-V loop. The RH/RL is greater than 104, the endurance is about 104 cycles, and the retention time exceeds 104 s. In the initial stage, the HfO2/NiOx(200)/ HfO2 stack shows similar bi-level RS characteristics to the NiOx(200)/HfO2 stack. However, in the middle and the last stages, its I-V curves gradually evolve into tri-level RS characteristics with a "two-step Setting process" in the positive voltage region, showing potential applications in multilevel nonvolatile memory devices and brain-like neural synapses. Its I-V curves in the high and the low resistance state follow the relationship of ohmic conduction (I proportional to V), while the I-V curves in the intermediate resistance state are dominated by the space-charge-limited-current mechanism (I proportional to V-2). The tri-level RS phenomena are attributed to the coexistence of the oxygen-vacancy conductive filaments in the NiOx(200) film and the space charge limited current in the upper HfO2 film.