1. A method for fabricating a resistive switching memory element, comprising: forming a metal-containing layer that comprises a first metal; forming an oxide layer adjacent to the metal-containing layer; and heating the metal-containing layer and the oxide layer to oxidize the first metal in the metal-containing layer with oxygen from the oxide layer and thereby form a resistive switching metal oxide layer and form a metal layer from a second metal that was contained in the oxide layer, wherein forming the metal layer comprises forming a second electrode.