Ubuntu下Android Studio安裝、配置和使用


Ubuntu下使用Android Studio開發應用程序,首先需要安裝該IDE。

情況1:Ubuntu下安裝Android Studio

打開Terminal,執行下述指令:

sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio

在執行步驟1時,James的情況是:

讓用戶選擇執行:Enter(繼續執行)或者Ctrl+C(終止執行)

等到按下Enter后,Terminal像失去指令,一直停留在上述結果處。若出現上述情況,可選擇終止執行操作,並再次執行上述指令即可。

情況2:在桌面為Android Studio添加快捷方式

進入指定系統文件目錄:

cd /usr/share/applications/

查看是否有和Android Studio對應的桌面文件:android-studio.desktop。

若存在,則打開並編輯;若不存在,則創建該文件並編輯。

sudo gedit /usr/share/applications/adroid-studio.desktop

如下所述:

[Desktop Entry]
Type=Application
Terminal=false
Name=Android Studio
Exec=/opt/android-studio/bin/studio.sh
Comment=Integrated Android developer tools for development and debugging.
Icon=/opt/android-studio/bin/studio.png
Categories=GNOME;GTK;Development;IDE;

其中Exec和Icon對應的路徑應和安裝目錄路徑相對應。

保存並關閉文件,運行下述命令:

sudo chmod +x /usr/share/applications/android-studio.desktop

繼續執行下述指令,以窗口的形式打開指定路徑目錄:

sudo nautilus /usr/share/applications

在上述窗口中,找到Android Studio快捷方式,將文件拖動到桌面即可。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM