install android studio in ubuntu linux

本文介绍如何在Ubuntu系统上安装JDK 7及Android Studio,并详细指导完成首个项目的搭建过程。包括解决常见错误,如无法运行mksdcard SDK工具及找不到adb等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1 install jdk-7
use below command in terminal:

点击(此处)折叠或打开

  1. sudo apt-get install openjdk-7-jdk

 when install java complete checkout it by below command:

点击(此处)折叠或打开

  1. java -version

when appear below message indicate the install is sucessful.

点击(此处)折叠或打开

  1. java version "1.7.0_79"
  2. OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
  3. OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

2 install android studio
    use below to install android studio automatically:

点击(此处)折叠或打开

  1. sudo apt-add-repository ppa:paolorotolo/android-studio

  2. sudo apt-get update

  3. sudo apt-get install android-studio
3 start a new project by android studio
     1) open the "android studio" at dir /opt/android-studio/bin and use  ./studio.sh to start the "android studio"
    then you may have some problem
    2)when you meet the error :Unable to run mksdcard SDK tool. use below command can resolve:

点击(此处)折叠或打开

  1. sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
     3)set the SDK in your own path
    like mine :

点击(此处)折叠或打开

  1. /home/warrior/Android/Sdk
    4) when you meet the error : Throwable: Unable to locate adb within SDK . you can solve it by below method:
    Check your [sdk directory]/platform-tools (my path: /home/warrior/Android/Sdk/platform-tools)directory, if it exists. If not, then open the SDK manager in the Android Studio (a button somewhere in the top menu, android logo with a down arrow in below picture and the selected icon ADM), and download&install the Tools > Android SDK Platform-tools.


then you can start a VM or use your own phone to test your project!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值