PORTLAND, ORE. — There is a door at Portland State University that doesn’t quite lock, and one afternoon in early April, the rapper Aminé walked up to it and gave it a hopeful tug. It popped open with an easy exhale, and he smiled. A couple of years ago, when he was still a student here studying marketing but plotting a music career, he would sneak into this building, make his way to a nondescript beige room on the second floor, and, in the quiet of night, accompanied by no one, work on his songs.

Striving to be a rapper in this city better known for indie rock, roots music and “Portlandia”-level whiteness was “super depressing,” he said. The scene was dead. No one replied to his entreaties to collaborate. He couldn’t afford to pay for a real studio.

But there was this unassuming room, where, in the fall of 2015, Aminé recorded onto his laptop the vocals for “Caroline,” the goofy flirtation — “great scenes might be great, but I love your bloopers/and perfect’s for the urgent/Baby, I want forever” — that became a surprise breakout hit last year, and took Aminé from frustrated college student to ascendant hip-hop star signed to a major label, Republic Records. In its video, which has accumulated more than 175 million views on YouTube, Aminé and his friends cavort around the city crammed into the back of a car, or sitting atop it, a high-definition take on low-resolution fun.