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

廉价感情. 提交于 2020-12-30 06:55:47

问题


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:

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.


回答1:


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:

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

maybe you changed accidently your SDK location.

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

Pay attention: using it on windows.




回答2:


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.



来源:https://stackoverflow.com/questions/64677522/gradle-sync-failed-com-android-tools-idea-gradle-project-sync-idea-issues-sdkpl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!