Articles

How to change API level to 31 in Android mobile App

Recently, you might have noticed an error while uploading Android moble App build to Google play console that you need to target latest level of APIs optimized for security and performance.

Your app currently targets API level 30 and must target at least API level 31 to ensure it is built on the latest APIs optimized for security and performance. Change your app’s target API level to at least 31.

Solution to this error is very simple and straight forward. Lets fix this issue using the following steps.

Install latest version of API through SDK Manager

Lets click on SDK Manager as mentioned in above screenshot. Clicking on SDK Manager will open up a popup window where we will need to select Appearance & Behavior -> System Settings -> Android SDK. When we select Android SDK from the left menu, we will see a list of SDK platform available to install. Select the ones you need to install and on clicking OK button will install the selected SDK platform.

Now we have our latest SDK installed, lets make the changes to two files to target latest APIs in our mobile APP.

  1. We need to make changes in Gradle Scripts -> bundle.gridle (Module:android.app)
  2. Then we need to make changes in manifests -> AndroidManifest.xml

As you can see, we changed compileSdkVersion to 30 and targetSdkVersion to 30. Now we need to sink it. Place your mouse cursor at the end of 30 in compileSdkVersion and press ALT+ENTER in the keyboard. You will see a popup like below.

Now repeat the same steps for targetSdkVersion by placing cursor at the end of 30 and click ALT+ENTER on your keyboard. You will see a popup asking you to update to latest SDK.

We are all done with the build.grade file. Now we need to make one change in second file which is app->manifests->AndroidManifest.xml

Here we need to place mouse cursor at the end of <activity and click ALT+ENTER on our keyboard. This will popup a window asking you to add exported=”true”

Now we are ready to build our App again and upload it to Google Play Store.

CADSLIST SEO BLOG

Recent Posts

The Best Spas in Dubai for the Ultimate Luxury Experience

A list of the best spas in Dubai that will relax your body and mind…

October 3, 2023

12 of The Best Make-Up Brands Available in Canada

Canada is a majestically beautiful country full of natural wonders and is also home to…

September 22, 2023

10 Best Makeup Brands in the United States

Here is a list of the Best USA Makeup Brands in 2023, that are safe…

September 20, 2023

The Best Australian Makeup Brands That You Need To Try

Here is a list of the Best Australian Makeup Brands in 2023, that are safe…

September 10, 2023

How to Create TikTok Content that can go Viral Easily?

Content creators always try hard to make their content reach a large number of followers…

September 8, 2023

Top Job Websites for Truck Drivers in Canada

Truck companies are constantly searching for people to fulfill their logistics, transportation, and supply chain…

August 11, 2023