简体   繁体   English

Android SDK Ubuntu 默认路径

[英]Android SDK Ubuntu default path

I am trying to build my Android app in Unity on Ubuntu , but cannot find Android SDK .我正在尝试在Ubuntu上的 Unity 中构建我的 Android 应用程序,但找不到 Android SDK What is Android SDK default path on Ubuntu ? Ubuntu上的 Android SDK默认路径是什么?

If you've installed the SDK using:如果您已经使用以下方式安装了 SDK:

apt install android-sdk

it is located at /usr/lib/android-sdk .它位于/usr/lib/android-sdk

The Path will be like,路径将是这样的,

Linux /home/AccountName/Android/Sdk Linux /home/AccountName/Android/Sdk

  • For Linux: ~/Android/Sdk对于 Linux:~/Android/Sdk
  • For Mac: ~/Library/Android/sdk对于 Mac:~/Library/Android/sdk
  • For Windows: %LOCALAPPDATA%\\Android\\sdk对于 Windows:%LOCALAPPDATA%\\Android\\sdk

If you've installed the SDK using the apt install android-sdk , it is located at /usr/lib/android-sdk如果您使用apt install android-sdk安装了 SDK,它位于/usr/lib/android-sdk

then copy that folder (android-sdk) to your home folder ex: home/username/Android/android-sdk, because /usr/lib/android-sdk will prompt a not writable error..by default there's no Android folder in your home directory so create that folder first then paste inside it the android-sdk folder from /usr/lib然后将该文件夹 (android-sdk) 复制到您的主文件夹中,例如:home/username/Android/android-sdk,因为 /usr/lib/android-sdk 会提示不可写错误..默认情况下,您的文件夹中没有 Android 文件夹主目录,因此首先创建该文件夹,然后将 /usr/lib 中的 android-sdk 文件夹粘贴到其中

如果您使用sudo apt install android-sdk它,它应该在/usr/lib/

它应该在您的主文件夹中的Android/Sdk文件夹下,即~/Android/Sdk

I'm a little late to answer, but this would clarify some of the confusions.我回答有点晚了,但这会澄清一些困惑。

  • If you installed the SDK through the Ubuntu terminal using the command sudo apt install android-sdk it will be located at /usr/lib/android-sdk/如果您使用命令sudo apt install android-sdk通过 Ubuntu 终端sudo apt install android-sdk ,它将位于/usr/lib/android-sdk/
  • If you installed the Android SDK through the Android Studio it will be located at /home/<AccountName>/Android/Sdk如果您通过 Android Studio 安装了 Android SDK,它将位于/home/<AccountName>/Android/Sdk

Note that both these are the paths for Ubuntu请注意,这两个都是 Ubuntu 的路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM