我下载了安卓工作室2.3.3 https://developer.android.com/studio/index.html for Linux
并将内容解压到/usr/local
then
$ cd android-studio/bin
编辑了文件idea.properties
并向其附加以下行:
disable.android.first.run=true
然后启动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
And it will stuck. After long waiting I termited it with Ctrl+C
尝试附加到进程strace
查看它正在做什么(例如,等待网络或文件)。或者运行它strace
像这样:
strace -o foo.log -s1024 -f ./studio.sh
After a while, break it with Ctrl-C and examine the log file for syscalls like open, read, recvmsg.
或者,当它运行时,您可以附加Java 分析器 to the jvm。首先,您可以启动jconsole
or jvisualvm
并附加到安卓工作室(它将显示为空名称,仅包含 PID)并查看各个线程的堆栈跟踪。在jvisualvm
您可以查看 CPU 使用率示例并单击热点事件并查看堆栈跟踪。
基本上,您需要找出应用程序这么长时间以来试图访问的内容。最有可能的是一些网络资源。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)