Born in Las Palmas, Viera finished his youth career with hometown's UD Las Palmas, where he earned the nickname Romário. He made his senior debuts with the reserve team, appearing in ten third division games in the 2008–09 season and suffering relegation; on 18 February 2010, he renewed his contract until June 2013. Viera was definitely promoted to the main squad for 2010–11, as the team competed in the second level. He finished the campaign with 31 matches and six goals, including three in a 5–3 away win against FC Barcelona B on 15 May 2011, which all but certified the Canary Islands side's permanence. In January 2012, amidst rumours of a transfer – Las Palmas inclusively had everything arranged with Granada CF but the deal eventually fell through – Viera assured he would stay with his club until the end of the season. He finished as the second-best top scorer in the squad at nine, only trailing another youth graduate, Vitolo, by one goal.
Valencia
On 6 May 2012, one month before the Las Palmas season ended, Viera signed with La Liga's Valencia CF for five years and €2.5 million. He made his official debut against FC Barcelona, playing 13 minutes in a 0–1 away loss. Viera scored his first goal in the top flight on 29 September 2012, closing the score in a 2–0 home win over Real Zaragoza. On 30 August of the following year, he was loaned to Madrid-based Rayo Vallecano in a season-long move without the option of making the deal permanent afterwards.
On 14 January 2015, Viera was loaned to Las Palmas until June. He contributed with seven goals in 21 appearances, as his team returned to the top division after a 13-year absence. On 14 July 2015, Viera signed a permanent three-year deal for €900,000.
Beijing Guoan
On 19 February 2018, Viera joined Chinese Super League club Beijing Sinobo Guoan F.C. on a four-year contract for a fee of around €11 million. The player acknowledged the transfer "took care" of his future, and Las Palmas retained a buy-back option in the future. On 7 April 2019, he was named the competition's Player of the Month for the previous month. On 28 April 2019, Viera completed the second hat-trick of his career by scoring three goals in a 4–1 home defeat of Dalian Yifang F.C. in the domestic league. In August, he was loaned to Las Palmas until the end of the year.