Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle sync failed: com.android.tools.idea.gradle.project.sync.idea.issues.SdkPlatformNotFoundException: Module: 'app' platform 'android-29' not found

Installed Android 4.1 on Ubuntu 20.04. Getting the following error:

Gradle sync failed: com.android.tools.idea.gradle.project.sync.idea.issues.SdkPlatformNotFoundException: Module: 'app' platform 'android-29' not found.

On opening the SDK manager I get the following screen: android studio screenshot

I also executed $ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --licenses

How to fix this?

------ edit ---------

This is what shows in the SDK Platforms tab. Unchecking the "Hide Obsolete Packages" doesn't change anything.

Sdk platforms

like image 561
Pradeep Kumar Jha Avatar asked Nov 04 '20 09:11

Pradeep Kumar Jha


People also ask

How do I resolve gradle issues?

For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.

Where is Sync project with gradle files?

gradle file and then click on Open for Editing with Android Studio at the top right. This will open just the Android project in a new Android Studio window and you will be able to see all the Gradle commands then (for example, under File > Sync...).


2 Answers

As the error is saying. Install the SDK Platform with API Level 29. YOu need to switch to the tab " SDK Platforms and install the right API Level:

enter image description here

-----------edit--------------

maybe you changed accidently your SDK location.

Mine is on C:\Users\elmo\AppData\Local\Android\Sdk

Pay attention: using it on windows.

like image 116
elmo Avatar answered Sep 20 '22 20:09

elmo


go to the "sdk platforms" you can find it by click on navigate->find anywhere than enter "sdk" than what you need is to find the api level you need (29 in your case) and check the box near it.

like image 32
daniel Avatar answered Sep 19 '22 20:09

daniel