首次运行时,Android Studio 2.3.3卡住 [英] Android Studio 2.3.3 stucks when first run

查看:155
本文介绍了首次运行时,Android Studio 2.3.3卡住的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Linux下载了 Android Studio 2.3.3 并解压缩了内容到/usr/local 然后

I downloaded Android Studio 2.3.3 for Linux and unzipped the content to /usr/local then

$ cd android-studio/bin

编辑文件idea.properties,并在其后添加以下行:

Edited the file idea.properties and appended a following line to it:

disable.android.first.run=true

然后启动了Android Studio:

Then launched Android Studio:

$ sudo sh studio.sh

Looking in classpath from com.intellij.util.lang.UrlClassLoader@1a7cec2 for /com/sun/jna/linux-x86/libjnidispatch.so
Found library resource at jar:file:/usr/local/android-studio/lib/jna.jar!/com/sun/jna/linux-x86/libjnidispatch.so
Trying /root/.AndroidStudio2.3/system/tmp/jna5562911082428971611.tmp
Found jnidispatch at /root/.AndroidStudio2.3/system/tmp/jna5562911082428971611.tmp
[  40066]   WARN - dea.updater.SdkComponentSource - File /root/.android/repositories.cfg could not be loaded. 
^C[18124266]   WARN - pl.local.NativeFileWatcherImpl - Watcher terminated with exit code 130 

它会卡住.经过漫长的等待,我用 Ctrl + C

And it will stuck. After long waiting I termited it with Ctrl+C

推荐答案

我认为您遇到的所有问题都是因为您在第一次运行时以root(sudo)身份运行.

I think all your problems happen because you ran as root (sudo) on your first run.

因此,尝试像我在下面建议的那样进行全新安装之前,先取消root :

So try to unroot before doing a clean install like I suggest below:

  1. cd到之前将 Android Studio 解压缩到的文件夹

  1. cd to the folder where you unzipped Android Studio before

cd ..

递归更改用户和组:

sudo find <thedirname> -print0 | xargs -0 chown <yourusername>:<yourgroupname>

  • cd ~cd回到家

  • cd ~ or cd to go back to home

    递归更改用户和组

    sudo find .Android* -print0 | xargs -0 chown <yourusername>:<yourgroupname>
    

    (我sudo是因为您以前使用过root用户).

    (I sudo because you've used root user previously).

    递归更改用户和组

    sudo find Android* -print0 | xargs -0 chown <yourusername>:<yourgroupname>
    

  • cd进入解压缩的目录.做chmod +x studio.sh.

  • cd into the unzipped directory. Do chmod +x studio.sh.

    启动 Android Studio ./studio.sh

    如果没有帮助,请执行以下操作:

    If it didn't help, do a:

    1. 下载并解压缩 Android Studio 的新副本.我建议版本3 ,它已预先发布,但很稳定.放在哪里都没关系.

    1. Download and unzip a fresh copy of Android Studio. I suggest version 3, it's pre released, but stable. It doesn't matter where you put it.

    我相信您已经安装了 Java ,但是请确保已将Java 8作为默认名称:在命令行中:java -version,请确保其为1.8.

    I believe you have Java installed, but make sure you have Java 8 as the default one: in command line: java -version, make sure it's 1.8.

    将所有旧安装移开,以防它们损坏:

    Move any old installations out of the way, in case they are corrupt:

    sudo mv ~/.Android* ~/tmp/
    sudo mv ~/Android ~/tmp/
    

    应该可以解决问题. (我sudo是因为您以前使用过root用户).

    should do the trick. (I sudo because you've used root user previously).

    cd进入解压缩的目录.做chmod +x studio.sh.

    cd into the unzipped directory. Do chmod +x studio.sh.

    启动 Android Studio ./studio.sh

    确保所有文件都归您的username所有,并进行分组.

    Make sure all the files are owned by your username, and group as well.

    这篇关于首次运行时,Android Studio 2.3.3卡住的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆