0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ubuntu22.04にAndroid Studioをインストール

Last updated at Posted at 2025-05-22

環境

  • ubuntu22.04

ダウンロード

からダウンロード。
この記事を書いたときは
android-studio-2024.3.2.14-linux.tar.gzだった。

インストール

以下シェル

cd Downloads
tar -zxvf android-studio-2024.3.2.14-linux.tar.gz

これでDownloadsフォルダにandroid-studioフォルダができる。
これを/usr/localに移動させる。

sudo mv android-studio /usr/local/
cd /usr/local/android-studio/bin

これでstudio.shを実行すればAndroidStudioが起動される。そのあとはGUIの支持にしたがって適当にAcceptしてたら完了。

エイリアスの設定

毎回cd /usr/local...なんて打つのは嫌すぎるため、エイリアスを設定する。

echo 'alias studio="/usr/local/android-studio/bin/studio.sh"' >> ~/.zshrc

で.zshrcにエイリアスを追加

source ~/.zshrc

で設定を反映。

これ以降は

android-studio

で起動できる。

デスクトップエントリの作成

アプリ一覧にAndroidStudioを表示する

nano ~/.local/share/applications/android-studio.desktop

.desktopのなかに

[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio
Icon=/usr/local/android-studio/bin/studio.png
Exec="/usr/local/android-studio/bin/studio.sh" %f
Comment=Android IDE
Categories=Development;IDE;
Terminal=false

↑を書き込んで

update-desktop-database ~/.local/share/applications

をデスクトップに反映。

終わり。

↓↓↓↓↓↓↓↓ここの動画にほとんど同じ内容が書いてある

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?