HOUSTON (AP) — James Shields had another strong start for Kansas City on Wednesday night. Unfortunately for Shields and the Royals, the rest of the game was also familiar.

Shields pitched seven solid innings, but Kansas City managed just six hits in a 3-1 loss to the Houston Astros.

"It's a little frustrating," Royals manager Ned Yost said. "Especially when James Shields goes out and gives you the type of performance he gives you about every time he goes out. We just have not done a good job with run support with him at all."

Shields (2-5) struck out seven while yielding two runs and seven hits. He has gone seven or more innings in each of his last six starts, but hasn't won since April 30 due in part to his offense providing him with just five runs combined in his last four starts.

"The one thing our lineup is not doing a great job of right now is producing runs," right fielder Jeff Francoeur said. "That's something we have talked about that we need to do, and hopefully, we can start doing a better job of that. It seems like once again Shields is the guy that we just can't give any runs to."

J.D. Martinez hit a two-run homer in the first, helping Houston take two of three from Kansas City for its fourth series win this season. Jordan Lyles (2-1) allowed one run and six hits in six innings.

Shields, who was acquired in an offseason trade with Tampa Bay, retired his first two batters before running into trouble. Jason Castro singled before Martinez drove a 2-2 pitch into the seats in right for his fourth homer.

Shields is confident the lack of run support will turn around soon.

"These guys are great. They are grinding every day," Shields said. "We are going through a little struggle right now. Our heads are high, and we are staying positive. It is a long season. By no means are we out of it."

Castro tacked on an RBI single in the eighth inning against Kelvin Herrera.

After Lyles departed, Travis Blackley and Hector Ambriz each got three outs before Jose Veras pitched a perfect ninth for his eighth save one night after the bullpen struggled in a 7-3 loss.

Yost wasn't ready to talk about if it was time for a change on offense after his team scored one run for the third time in seven games.

"I don't even talk about things like that after a game like this because you are emotional," he said. "Things like that have to be well thought out, and the thought process, especially after a game like that, isn't real trustworthy right now."

Kansas City got its only run in the third when Francoeur hit a leadoff triple to the hill in center and George Kottaras followed with an RBI double. Alex Gordon walked with two down, but Lyles struck out Billy Butler to end the inning.

Lyles also got Gordon to bounce out with two runners on to end the fifth.

After their two-run first inning, the Astros had trouble stringing together hits against Shields. Martinez singled to start the fourth, but was thrown out trying to stretch it into a double. Chris Carter followed with a single but Shields retired the next two batters to end the inning.

Gordon singled in the first inning to extend his hitting streak to 10 games.

NOTES: Houston is off on Thursday. ... The Royals return home to open a four-game series with the Angels. ... Kansas City C Salvador Perez was out of the lineup for the second straight game after bruising his right hip after crashing into the railing chasing a foul ball on Monday. He said he has a gigantic bruise on his hip, but is OK and that he could have played on Tuesday. He is day to day. ... Dominguez is expected to be back in the lineup on Friday.