android - 找不到 SDK 位置

标签 android android-studio android-gradle-plugin build.gradle

下载 Android Studio Beta 的最新更新后。我收到如下错误:

3:07:53 PM ProcessNotCreatedException: Cannot run program "/Applications/Android Studio.app/sdk/tools/android": error=2, No such file or directory: Cannot run program "/Applications/Android Studio.app/sdk/tools/android": error=2, No such file or directory

enter image description here

enter image description here

问题是我无法找出要放入 SDK 位置的内容。 enter image description here

所以我被卡住了,因为我什至无法打开新项目、编译、构建、打开 SDK 管理器等。

我的 local.properties 是:

## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=/Applications/Android Studio.app/sdk

我不确定如何解决这个错误。我一直在关注我在这里找到的信息,但没有运气:

Android Studio - SDK is out of date or is missing templates

Gradle build errors after updating Android Studio

最佳答案

我使用 Android Studio 已经有一段时间了,还没有尝试只使用现在应该包含 SDK 的 Beta 版本进行全新安装。由于它似乎没有随您的 Android Studio Beta 安装一起安装,您可以尝试单独安装它。去here并单击“获取现有 IDE 的 SDK”。一个优点是这允许您进行更多控制,并且您将确切知道 SDK 的安装位置。

关于android - 找不到 SDK 位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24542905/

相关文章:

Android Studio : Add library as reference, 不作为导入

Android Studio应用程序:transformClassesWithDexForDebug

android - 带有buildFlavors的Android distZip

android - HttpsURLConnection 间歇性地失败到同一 URL

android - 如何为调试和 Release模式设置 Firebase Crashlytics

android - 了解 Maven 中依赖项的可用版本

android - 启动项目时出现无法理解的错误(gradle)

android - 从服务中的 Activity 更改窗口参数

android - @Onclick android 注释?

android-gradle-plugin - 升级库版本导致依赖库的项目构建失败