Gradle 同步失败:com.android.tools.idea.gradle.project.sync.idea.issues.SdkPlatformNotFoundException:模块:“app"平台“android-29"未找到 [英] Gradle sync failed: com.android.tools.idea.gradle.project.sync.idea.issues.SdkPlatformNotFoundException: Module: 'app' platform 'android-29' not found
问题描述
在 Ubuntu 20.04 上安装了 Android 4.1.收到以下错误:
Installed Android 4.1 on Ubuntu 20.04. Getting the following error:
Gradle 同步失败:com.android.tools.idea.gradle.project.sync.idea.issues.SdkPlatformNotFoundException:模块:app"平台android-29"未找到.
打开 SDK 管理器时,我看到以下屏幕:
On opening the SDK manager I get the following screen:
我也执行了$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --licenses
如何解决这个问题?
------ 编辑 ---------
------ edit ---------
这就是 SDK 平台选项卡中显示的内容.取消选中隐藏过时的包"不会改变任何东西.
This is what shows in the SDK Platforms tab. Unchecking the "Hide Obsolete Packages" doesn't change anything.
推荐答案
正如错误所说.使用 API 级别 29 安装 SDK 平台.您需要切换到选项卡;SDK 平台并安装正确的 API 级别:
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--------------
也许您不小心更改了您的 SDK 位置.
maybe you changed accidently your SDK location.
我的在 C:\Users\elmo\AppData\Local\Android\Sdk
注意:在windows上使用.
Pay attention: using it on windows.
这篇关于Gradle 同步失败:com.android.tools.idea.gradle.project.sync.idea.issues.SdkPlatformNotFoundException:模块:“app"平台“android-29"未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!