In an interview with Playboy, JJ Abrams was asked whether directing Star Wars would take him out of the running for the third Star Trek film, Abrams replied: “No, I would say it’s a possibility.”
“We’re trying to figure out the next step. But it’s like anything: it all begins with the story.”
Abrams went on to discuss the conflict between the two franchises, admitting that he initially “couldn’t imagine doing both”. 
“When I said that my loyalty was to Star Trek, I was literally working on finishing this cut. I couldn’t even entertain another thought.”
“It was like being on the most beautiful beach in the world and someone saying, ‘There’s this amazing mountain over here. Come take a look’. I couldn’t balance the two, so I passed on Star Wars.”
Source Playboy