我从官网下载了Android Studio,M1芯片(arm)的.
I've downloaded Android Studio from the official website, the one for M1 chip (arm).
基本是第一次运行,报错如下:
Basically running it for the first time, the error is the following:
An error occurred while trying to compute required packages
我整天都在搜索它以找出一种使 Android Studio 工作的方法,但该错误一直显示.不完全确定它是否与 M1 Macbook 有关,因为在我的 Intel 上它可以按预期工作.
I was searching about it the whole day to figure out a way to make Android Studio work, but that error keeps showing. Not completely sure if it's related to M1 Macbook, as on my Intel one it works as expected.
我已经尝试过的事情:
安装命令行工具,然后将其放在 SDK 文件夹 (Users/user/Library/Android/sdk).然后将 bin
添加到 PATH (参考)
Installing the command line tools, then placing it on SDK folder (Users/user/Library/Android/sdk). Then added the bin
to the PATH (Reference)
Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
之后我尝试检查如果单击New Project
会发生什么,然后显示以下内容:
After that I try to check what happens if I click on New Project
, then the following is shown:
Android SDK 位置不能位于文件系统根目录
The Android SDK location cannot be at the filesystem root
Android SDK 位置不能在文件系统根目录
,所以我再次搜索它尝试计算所需的包时发生错误
.
The Android SDK location cannot be at the filesystem root
, so I searched again about it
An error occurred while trying to compute required packages
.似乎无论我做什么,最终都会显示相同的消息.
Seems like no matter what I do, it ends up showing up that same message.
当我运行 java -version 时,我看到了:
When I run java -version that's what I see:
java version "1.8.0_311"
Java(TM) SE Runtime Environment (build 1.8.0_311-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)
有人遇到同样的问题吗?难道我做错了什么?不知道如何从这里开始,尽管我下载的 Android Studio 版本总是相同的结果.
Did anyone have the same issue? Am I doing something wrong? Not sure how to proceed from here, despite of the Android Studio version I download it's always the same result.
感谢任何帮助.
这就是我在 M1 上为我解决的问题.
This is what solved it for me on my M1.
现在,当您启动稳定的 Android Studio (Arctic Fox) 时,您应该不会看到该错误.
Now when you start your stable Android Studio (Arctic Fox) you should not see the error.
这篇关于Macbook M1 上有关 Android Studio 的错误:尝试计算所需的包时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!