ubuntu android studio 配置和使用

Ubuntu 64位,Android studio 的安装,配置和使用

1 Download it.

2 设置环境变量:

export ANDROID_STUDIO=/home/usrname/Documents/android-studio/bin

export PATH=${ANDROID_STUDIO}:$PATH

 

这样任何界面,都可以studio.sh启动。

 

3 下载gradle-1.8-bin.zip总是失败。

修改 studio/bin/studio64.vmoptions

-Djava.net.preferIPv4Stack=true  

-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml  

-Didea.patches.url=http://dl.google.com/android/studio/patches/  

 

将gradle-1.8-bin.zip放入~/.gradle/wrapper/dists/gradle-1.8-bin/72srdo3a5eb3bic159kar72vok/文件夹中,重启android studio

 

 

4  WARN - ateSettings.impl.UpdateChecker - Connection failed.

 

配置  ~/.AndroidStudio/config/options/other.xml

<?xml version="1.0" encoding="UTF-8"?>

<application>

  <component name="HttpConfigurable">

    <option name="USE_HTTP_PROXY" value="true" />

    <option name="PROXY_HOST" value="127.0.0.1" />

    <option name="PROXY_PORT" value="3128" />

  </component>

</application>

 

change 127.0.0.1 to your real proxy.

 

 

7

error 1 :No cached version listing for com.android.tools.build:gradle:0.12.+ available for offline mode.

check "Offline work" in File>Settings>Gradle>Global Gradle Settings

 

8 jdk setting

执行下面命令,配置需要默认的JDK

 

sudo update-alternatives --config java  

会列出jdk版本,其中被“*”标注的为默认JDK。如果要维持当前默认JDK,直接按回车键即可;否则输入相应JDK的编号将其设置为默认版本。

 

9 A problem occurred configuring project ':Application'.

> Could not resolve all dependencies for configuration ':Application:_debugCompile'.

   > Could not find any version that matches com.android.support:support-v4:21.+.

     Required by:

         BasicNotifications:Application:unspecified

   > Could not find any version that matches com.android.support:gridlayout-v7:21.+.

     Required by:

 

 

sloution: update and download any missing build-tools and make sure you update the Android Support Repository and Android Support Library under Extras. Restart Android Studio after the SDK Manager finishes

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值