what is something NEEDED in a friendship?

there’s always the saying opposites attract. i think it can apply with differing interests and positive attributes, but ultimately there needs to be some underlying values in common. otherwise the friendship will implode