For years, Apple’s App Store, the place where people download apps for games and social networking services on their iPhones and iPads, has generated far more revenue worldwide than its Android competitors.

This year, things are changing: Android app distributors will leap ahead of the App Store, according to projections by analytics firm App Annie. In 2017, the App Store will generate $40 billion in revenue, while Android app stores run by Google and other parties will generate $41 billion, App Annie said. That gap is expected to widen in 2021, with Android app stores generating $78 billion and Apple’s store at $60 billion, according to the analytics firm’s report, which was released on Wednesday.

The surge in revenue for Android comes largely from a growing number of consumers in China who prefer Android smartphones, which tend to be cheaper than iPhones, and are willing to pay for apps. In 2021, App Annie forecasts that there will be eight Android devices to every iPad or iPhone in China.

“It’s really all about China,” said Danielle Levitas, senior vice president of research at App Annie.

MBA BY THE BAY: See how an MBA could change your life with SFGATE's interactive directory of Bay Area programs.

About 82 percent of the world’s smartphone users rely on the Android operating system, according to research firm IDC — far more than the 16 percent who use Apple’s mobile operating system, iOS. Despite Android’s larger global reach, people in emerging countries haven’t been as willing to pay for apps as luxury consumers who could afford an iPhone, which costs at least $649 in the U.S. That has changed in recent years, app developers say.

“It’s 2017. That’s not really how the market is anymore,” said Russell Ivanovic, co-founder of Australian firm Shifty Jelly, which develops apps for smartphones. Ivanovic said the company’s $4 podcast app, Pocket Casts, has four Android customers for every one iOS customer.

Alex Haro, president of family locator app Life360 in San Francisco, said one advantage of developing for the Android platform is that Google allows his firm to include an unlimited number of users in a test group. For example, his firm tested a feature that could detect whether a user had been in a car accident using the phone’s accelerometer and gyroscope, allowing the app to send an alert to a family member and call emergency services.

With extensive testing, Life360 was “able to make the algorithm much better for the entire user base,” said Haro, whose company has received funding from Google.

Apple’s iOS system also allows developers to test apps, but the tests are limited to 2,000 users, which Haro thinks is too small.

Google, which oversees the Android operating system, said it has more than 1 million apps available for download at its Google Play store and that spending at its store increased more than 30 percent per buyer in 2015 compared to the year before. Google Play is available in more than 190 countries.

“Google Play continues to be one of Google’s fastest growing businesses with tremendous momentum behind it,” the company said in a statement.

Apple did not respond to a request for comment on App Annie’s report.

Google Play represents $21 billion, or 51 percent, of the revenue of Android app store sales in 2017, according to App Annie. The rest of the sales comes from independent distributors, including some that sell apps in places like China, where Google Play isn’t available.

Levitas from App Annie said she doesn’t believe the increasing Android app store sales will do much to sway which operating system developers build apps on first. Apple’s iOS still generates more money per device compared with Android, and “that alone means you don’t ignore iOS,” she said.

Another factor going for Apple is that its App Store is available in China. Google pulled out of China in 2010, after cyberattacks and censorship demands made the company skittish.

More people in China will purchase Android phones over iPhones because they are relatively affordable, analysts said. An Android phone can be purchased in China for roughly $300, said John Cui, assistant professor at Georgetown University’s McDonough School of Business.

Some Android app developers said it is challenging for them to enter the China market because the Google Play store isn’t there. They are reluctant to go through other distributors in China because they aren’t sure whether those stores will maintain the same standards as Google’s.

“I so wish and plead and hope that one day the Google (Play store) will be available in China,” said Alok Kejriwal, CEO of online gaming company Games2win in India. “It’s a massive opportunity that we are all waiting to exploit.”

Wendy Lee is a San Francisco Chronicle staff writer. Email: wlee@sfchronicle.com Twitter: @thewendylee