I guess:
In early 2010s, Chinese Air Force planned for possible options for their future cost-friendly fleet, which are J11D/J16 (domestic produced Su27/Su30 with upgraded radar). The two were compared and J16 was prefered.
FC31 was a third option, but the Air Force didn't like it then, for whatever reasons (too costly or too little payload or else). The Navy found this to be a potential option for their stealth fighter for carrier, and then invested. The name J35 was given at some point after the Navy wanted it. Upto here it sounds like the story of YF17-F18.
Then, at some point, the Air Force reviewed propotypes of J35 and realized it outperformed J16. The latter just can't detect J35 in a combat, while the price tag of J35 looks reasonable. The Air Force want to have their version as well, and there comes the J35A.