a semiconductor device includes : a foundation layer that is provided on a substrate and is electrically conductive ; a nickel layer provided on the foundation layer ; and a solder provided on the nickel layer , the nickel layer having a first region on a side of the foundation layer and a second region on a side of the solder , the second region being harder than the first region .