Jennifer Lopez is back after a long recording layoff. (AP Photo/Mark J. Terrill)

Years went by. Release dates were missed. Trial balloon singles tanked (R.I.P. “Louboutins”; we hardly knew ye, “Fresh Out the Oven”). “Love?” might never have been released had it not been for Lopez’s unlikely career re-rebirth courtesy of “American Idol.”

“Love?” is a powerful example of how commercial might makes right: Before “Idol,” Lopez could have made “Blood on the Tracks,” and no one would have been interested. Post-“Idol,” the expensive-sounding, occasionally charming and ultimately mediocre “Love?” just might be her first hit in years.

In its best moments, “Love?” is the most solid album Lopez has made, even though it lacks a knockout punch like “Get Right.” It’s a history lesson in slightly dated Top 40 pop, circa 2008 to 2011: There are the songs that sound like the Black Eyed Peas (“Good Hit,” which isn’t), probably recorded back when sounding like the Black Eyed Peas was something people actually wanted to do. There’s the Rihanna-esque “I’m Into You,” which features Lil Wayne and the tattered remains of his street cred. There are (presumably more recent) Lady Gaga-recalling songs, co-produced and/or co-written by Gaga herself without the slightest hint of noblesse oblige. They’re mostly pretty great, especially the bonus cut, “Hypnotico,” a synthy, burbly slip of a song.

There are also timeless exercises in generically pleasing Europop including “(What Is) LOVE?,” as well as bona fide smokers such as “On the Floor” (with Pitbull, who exists to make songs like this better). Lopez does a lot more “singing” than at any time in memory, most notably on a handful of songs that mirror the album’s title, semi-serious (maybe totally serious?) ruminations on relationships. In quasi-ballad mode, she sounds as much like Madonna as she does herself, though this may be the usual fate of a small-voiced diva run through a vocal enhancement program.

“Love?” is a relentless carnival of warring noises and themes, but that’s not a bad thing: Lopez has never seemed this effortful, never thrown this much at the wall. It could seem desperate, but it’s kind of endearing — usually, she doesn’t try. Save for a few offhand references to Cartier and Prada, she even keeps her usual “Sex and the City” consumerism to a minimum, though she isn’t above milking other famous aspects of her persona.

“One Love” examines her best-known relationships, including Puffy (“Took a shot with the bad boy from the block”) and Marc Anthony (“You sang to me, but I’m not sure”). Not that Lopez is trying to gin up controversy with these red-meat tidbits about her personal life. She honestly thought you might be curious about Ben Affleck and whatever happened to that huge engagement ring he gave her all those years ago, during Bennifer’s dark reign.

Reader, she kept it.

Recommended tracks: “On the Floor,” “I’m Into You”