我的 Android Studio/Gradle 遇到了一个问题,它经常会冻结我的整个系统。
会发生什么?
我使用 Android Studio 工作,一开始一切都很好。大约 5 - 10 次构建/部署后,一切都很好,但当我像往常一样单击“运行‘应用程序’”按钮时,构建会像往常一样开始,但系统突然变慢到基本冻结的程度。我的笔记本电脑上的磁盘 LED 指示灯疯狂闪烁,我还能听到磁盘正在努力工作。我无法切换到不同的控制台(++ CTRL),我甚至无法移动鼠标光标,因为它也被冻结了。似乎有什么东西吞噬了我笔记本电脑的所有资源。唯一有帮助的就是强制关机。有一次我试图等待看看是否有帮助,但 2 小时后我放弃了并强制关闭它。如果需要,我有该事件的日志。ALTF2
什么时候开始?
这一切都始于我切换到 Ubuntu 16.04 时。我尝试恢复到 14.04,我记得一切都正常。但后来我不得不回到 16.04(因为 Bumblebee 和 Nvidia 驱动程序存在问题),问题又出现了。此外 - 作为迁移到 16.04 的一部分,我不得不从 Bumblebee 切换到最新的 Nvidia 驱动程序(虽然我不确定这是否相关)
什么时候发生?
每隔几次构建(比如说 10 次)就会发生一次。基本上,经过 3 小时的工作,我可以保证系统会崩溃。
你用的是啥?
我的系统是
- Ubuntu 16.04
- Android Studio 2.3
- Gradle 2.3.0(虽然我没有在 Ubuntu 中安装 Gradle,但它只是我的项目中的一个依赖项)
- Oracle Java 版本“1.8.0_121”
- Linux 版本 4.4.0-66-generic
- Nvidia 驱动程序 367.57
- Intel® Core™ i5-2430M CPU @ 2.40GHz × 4
- GeForce GT 555M/PCIe/SSE2
你尝试过什么?
我尝试将 ~/.gradle/gradle.properties 中的 Gradle 设置更改为如下形式
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx1536m
虽然这没有帮助,但实际上却发生了相反的情况——当我将 Xmx 增加到 2056 时,在 2-3 次构建之后,冻结开始发生得更快。我还尝试将我的 Nvidia 驱动程序恢复到 304,但这没有帮助,冻结仍然发生。
例子
此事件发生在昨天 2017-03-10 22:14。我发布了当时日志的简短版本,但如果需要,我可以提供更多版本。
想法日志
2017-03-10 22:09:54,288 [8594964] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Actual binding is of type [org.gradle.internal.logging.slf4j.OutputEventListenerBackedLoggerContext]
2017-03-10 22:09:55,254 [8595930] INFO - pl.ProjectRootManagerComponent - project roots have changed
2017-03-10 22:09:55,626 [8596302] INFO - a.gradle.run.MakeBeforeRunTask - Gradle invocation complete, success = true
2017-03-10 22:09:57,039 [8597715] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 559ms; general responsiveness: ok; EDT responsiveness: ok
2017-03-10 22:09:57,238 [8597914] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 199ms; general responsiveness: ok; EDT responsiveness: ok
2017-03-10 22:09:57,238 [8597914] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 20 files to update
2017-03-10 22:09:58,159 [8598835] INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 921ms; general responsiveness: ok; EDT responsiveness: ok
2017-03-10 22:09:58,345 [8599021] INFO - #InstantRun - $ adb install-multiple -r -p eu.efreet.styrizmeny /home/miro/Development/workspaces/android/StyriZmeny/app/build/outputs/apk/StyriZmeny-0.5.1-debug.apk
2017-03-10 22:10:05,807 [8606483] INFO - #com.android.ddmlib - Opening a debugger listener at port 8600 for client with pid 17916
2017-03-10 22:10:07,124 [8607800] INFO - idea.run.AndroidProcessHandler - Adding device sony-d6503-BH91548F16 to monitor for launched app: eu.efreet.styrizmeny
2017-03-10 22:14:10,281 [8850957] INFO - #InstantRun - Invoking hotswap launch
2017-03-10 22:14:11,436 [8852112] INFO - #InstantRun - Build timestamps: Local: 1489180140216, Device: 1489180140216
2017-03-10 22:14:11,587 [8852263] INFO - #InstantRun - Ping sent and replied successfully, application seems to be running. Foreground=true
2017-03-10 22:14:11,644 [8852320] INFO - #InstantRun - Ping sent and replied successfully, application seems to be running. Foreground=true
2017-03-10 22:14:11,650 [8852326] INFO - ild.invoker.GradleBuildInvoker - About to execute Gradle tasks: [:app:assembleDebug]
2017-03-10 22:14:11,772 [8852448] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from /usr/lib/jvm/java-8-oracle
2017-03-10 22:14:11,787 [8852463] INFO - ild.invoker.GradleBuildInvoker - Build command line options: [--configure-on-demand, -Pandroid.injected.invoked.from.ide=true, -Pandroid.injected.build.api=23, -Pandroid.injected.build.density=xxhdpi, -Pandroid.injected.build.abi=armeabi-v7a,armeabi, -Pandroid.injected.restrict.variant.name=debug, -Pandroid.injected.restrict.variant.project=:app, -Pandroid.optional.compilation=INSTANT_DEV, -Pandroid.injected.coldswap.mode=MULTIAPK, --init-script, /tmp/asLocalRepo162.gradle]
2017-03-10 22:14:11,787 [8852463] INFO - xecution.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: [--configure-on-demand, -Pandroid.injected.invoked.from.ide=true, -Pandroid.injected.build.api=23, -Pandroid.injected.build.density=xxhdpi, -Pandroid.injected.build.abi=armeabi-v7a,armeabi, -Pandroid.injected.restrict.variant.name=debug, -Pandroid.injected.restrict.variant.project=:app, -Pandroid.optional.compilation=INSTANT_DEV, -Pandroid.injected.coldswap.mode=MULTIAPK, --init-script, /tmp/asLocalRepo162.gradle]
2017-03-10 22:21:45,458 [ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2017-03-10 22:21:45,650 [ 192] INFO - #com.intellij.idea.Main - IDE: Android Studio (build #AI-162.3764568, 24 Feb 2017 00:00)
2017-03-10 22:21:45,650 [ 192] INFO - #com.intellij.idea.Main - OS: Linux (4.4.0-66-generic, amd64)
2017-03-10 22:21:45,650 [ 192] INFO - #com.intellij.idea.Main - JRE: 1.8.0_112-release-b06 (JetBrains s.r.o)
2017-03-10 22:21:45,650 [ 192] INFO - #com.intellij.idea.Main - JVM: 25.112-b06 (OpenJDK 64-Bit Server VM)
2017-03-10 22:21:45,706 [ 248] INFO - #com.intellij.idea.Main - JVM Args: -Xbootclasspath/a:/home/miro/Development/android-studio/bin/../lib/boot.jar -Xms256m -Xmx1280m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -da -Djna.nosys=true -Djna.boot.library.path= -Djna.debug_load=true -Djna.debug_load.jna=true -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=/home/miro/Development/android-studio/bin/studio64.vmoptions -XX:ErrorFile=/home/miro/java_error_in_STUDIO_%p.log -XX:HeapDumpPath=/home/miro/java_error_in_STUDIO.hprof -Djb.restart.code=88 -Didea.paths.selector=AndroidStudio2.3 -Didea.platform.prefix=AndroidStudio -Didea.jre.check=true
构建日志
2017-03-10 22:09:37,510 [ 24738] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=602
2017-03-10 22:09:40,386 [ 27614] INFO - .incremental.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:false
2017-03-10 22:09:40,411 [ 27639] INFO - r.api.ClassFilesIndicesBuilder - class files data index disabled
2017-03-10 22:09:53,619 [ 0] INFO - etbrains.jps.cmdline.BuildMain - Build process started. Classpath: /home/miro/Development/android-studio/lib/jps-launcher.jar:/usr/lib/jvm/java-8-oracle/lib/tools.jar:/home/miro/Development/android-studio/lib/optimizedFileManager.jar:/home/miro/Development/android-studio/lib/ecj-4.5.2.jar
2017-03-10 22:09:55,962 [ 2343] INFO - etbrains.jps.cmdline.BuildMain - Connection to IDE established in 2164 ms
2017-03-10 22:09:56,339 [ 2720] INFO - jps.cmdline.JpsModelLoaderImpl - Loading model: project path = /home/miro/Development/workspaces/android/StyriZmeny, global options path = /home/miro/.AndroidStudio2.3/config/options
2017-03-10 22:09:57,502 [ 3883] INFO - jps.cmdline.JpsModelLoaderImpl - Model loaded in 1163 ms
2017-03-10 22:09:57,502 [ 3883] INFO - jps.cmdline.JpsModelLoaderImpl - Project has 2 modules, 25 libraries
2017-03-10 22:09:57,623 [ 4004] INFO - .JpsGradleExtensionServiceImpl - /home/miro/.AndroidStudio2.3/system/compile-server/styrizmeny_5c256e6c/gradle/configuration.xml (No such file or directory)
java.io.FileNotFoundException: /home/miro/.AndroidStudio2.3/system/compile-server/styrizmeny_5c256e6c/gradle/configuration.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at com.intellij.openapi.util.JDOMUtil.load(JDOMUtil.java:279)
at org.jetbrains.jps.gradle.model.impl.JpsGradleExtensionServiceImpl.getGradleProjectConfiguration(JpsGradleExtensionServiceImpl.java:125)
at org.jetbrains.jps.gradle.model.impl.JpsGradleExtensionServiceImpl.getGradleProjectConfiguration(JpsGradleExtensionServiceImpl.java:113)
at org.jetbrains.jps.gradle.model.impl.GradleResourcesTarget.computeRootDescriptors(GradleResourcesTarget.java:69)
at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.addRoots(BuildRootIndexImpl.java:72)
at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.<init>(BuildRootIndexImpl.java:62)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:84)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:266)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-03-10 22:09:57,782 [ 4163] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=602
2017-03-10 22:09:58,128 [ 4509] INFO - .incremental.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:false
2017-03-10 22:09:58,132 [ 4513] INFO - r.api.ClassFilesIndicesBuilder - class files data index disabled
2017-03-10 22:23:41,521 [ 0] INFO - etbrains.jps.cmdline.BuildMain - Build process started. Classpath: /home/miro/Development/android-studio/lib/jps-launcher.jar:/usr/lib/jvm/java-8-oracle/lib/tools.jar:/home/miro/Development/android-studio/lib/optimizedFileManager.jar:/home/miro/Development/android-studio/lib/ecj-4.5.2.jar
2017-03-10 22:23:44,400 [ 2879] INFO - etbrains.jps.cmdline.BuildMain - Connection to IDE established in 2694 ms
2017-03-10 22:23:45,069 [ 3548] INFO - jps.cmdline.JpsModelLoaderImpl - Loading model: project path = /home/miro/Development/workspaces/android/StyriZmeny, global options path = /home/miro/.AndroidStudio2.3/config/options
2017-03-10 22:23:47,029 [ 5508] INFO - jps.cmdline.JpsModelLoaderImpl - Model loaded in 1960 ms
2017-03-10 22:23:47,029 [ 5508] INFO - jps.cmdline.JpsModelLoaderImpl - Project has 2 modules, 25 libraries
2017-03-10 22:23:47,395 [ 5874] INFO - .JpsGradleExtensionServiceImpl - /home/miro/.AndroidStudio2.3/system/compile-server/styrizmeny_5c256e6c/gradle/configuration.xml (No such file or directory)
java.io.FileNotFoundException: /home/miro/.AndroidStudio2.3/system/compile-server/styrizmeny_5c256e6c/gradle/configuration.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at com.intellij.openapi.util.JDOMUtil.load(JDOMUtil.java:279)
at org.jetbrains.jps.gradle.model.impl.JpsGradleExtensionServiceImpl.getGradleProjectConfiguration(JpsGradleExtensionServiceImpl.java:125)
at org.jetbrains.jps.gradle.model.impl.JpsGradleExtensionServiceImpl.getGradleProjectConfiguration(JpsGradleExtensionServiceImpl.java:113)
at org.jetbrains.jps.gradle.model.impl.GradleResourcesTarget.computeRootDescriptors(GradleResourcesTarget.java:69)
at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.addRoots(BuildRootIndexImpl.java:72)
at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.<init>(BuildRootIndexImpl.java:62)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:84)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:266)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-03-10 22:23:47,489 [ 5968] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=602
系统日志
Mar 10 22:07:23 miro-msi org.gtk.vfs.Daemon[1714]: dc04: Object Size UINT64 data type READ ONLY
Mar 10 22:11:23 miro-msi gnome-session[1839]: INFO:root:caffeine is inhibiting desktop idleness
Mar 10 22:11:50 miro-msi gnome-session[1839]: INFO:root:caffeine is no longer inhibiting desktop idleness
Mar 10 22:12:50 miro-msi gnome-session[1839]: INFO:root:caffeine is inhibiting desktop idleness
Mar 10 22:14:51 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: snd_pcm_avail() returned a value that is exceptionally large: 439744 bytes (2290 ms).
Mar 10 22:14:51 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
Mar 10 22:15:04 miro-msi kernel: [12713.696036] wlp4s0: deauthenticated from 44:55:b1:d8:63:94 (Reason: 16=GROUP_KEY_HANDSHAKE_TIMEOUT)
Mar 10 22:15:03 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: snd_pcm_dump():
Mar 10 22:15:05 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Soft volume PCM
Mar 10 22:15:05 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Control: PCM Playback Volume
Mar 10 22:15:07 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: min_dB: -51
Mar 10 22:15:08 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: max_dB: 0
Mar 10 22:15:08 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: resolution: 256
Mar 10 22:15:08 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Its setup is:
Mar 10 22:15:08 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: stream : PLAYBACK
Mar 10 22:15:09 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: access : MMAP_INTERLEAVED
Mar 10 22:15:11 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: format : S16_LE
Mar 10 22:15:11 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: subformat : STD
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: channels : 2
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: rate : 48000
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: exact rate : 48000 (48000/1)
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: msbits : 16
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: buffer_size : 16384
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_size : 8192
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_time : 170666
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: tstamp_mode : ENABLE
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: tstamp_type : MONOTONIC
Mar 10 22:15:12 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_step : 1
Mar 10 22:15:13 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: avail_min : 15665
Mar 10 22:15:18 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_event : 0
Mar 10 22:15:20 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: start_threshold : -1
Mar 10 22:15:20 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: stop_threshold : 4611686018427387904
Mar 10 22:15:20 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: silence_threshold: 0
Mar 10 22:15:20 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: silence_size : 0
Mar 10 22:15:20 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: boundary : 4611686018427387904
Mar 10 22:15:20 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Slave: Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Mar 10 22:15:22 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Its setup is:
Mar 10 22:15:22 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: stream : PLAYBACK
Mar 10 22:15:22 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: access : MMAP_INTERLEAVED
Mar 10 22:15:23 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: format : S16_LE
Mar 10 22:15:23 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: subformat : STD
Mar 10 22:15:23 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: channels : 2
Mar 10 22:15:23 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: rate : 48000
Mar 10 22:15:23 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: exact rate : 48000 (48000/1)
Mar 10 22:15:24 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: msbits : 16
Mar 10 22:15:25 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: buffer_size : 16384
Mar 10 22:15:25 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_size : 8192
Mar 10 22:15:25 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_time : 170666
Mar 10 22:15:25 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: tstamp_mode : ENABLE
Mar 10 22:15:25 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: tstamp_type : MONOTONIC
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_step : 1
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: avail_min : 15665
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_event : 0
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: start_threshold : -1
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: stop_threshold : 4611686018427387904
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: silence_threshold: 0
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: silence_size : 0
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: boundary : 4611686018427387904
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: appl_ptr : 10145784
Mar 10 22:15:27 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: hw_ptr : 10239336
Mar 10 22:15:39 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: snd_pcm_delay() returned a value that is exceptionally large: -9417504 bytes (-49049 ms).
Mar 10 22:15:39 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
Mar 10 22:15:49 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: snd_pcm_dump():
Mar 10 22:15:50 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Soft volume PCM
Mar 10 22:15:50 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Control: PCM Playback Volume
Mar 10 22:15:50 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: min_dB: -51
Mar 10 22:15:50 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: max_dB: 0
Mar 10 22:15:50 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: resolution: 256
Mar 10 22:15:50 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: Its setup is:
Mar 10 22:15:50 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: stream : PLAYBACK
Mar 10 22:15:53 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: access : MMAP_INTERLEAVED
Mar 10 22:15:53 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: format : S16_LE
Mar 10 22:15:53 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: subformat : STD
Mar 10 22:15:53 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: channels : 2
Mar 10 22:15:53 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: rate : 48000
Mar 10 22:15:53 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: exact rate : 48000 (48000/1)
Mar 10 22:15:53 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: msbits : 16
Mar 10 22:15:55 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: buffer_size : 16384
Mar 10 22:15:56 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_size : 8192
Mar 10 22:15:57 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_time : 170666
Mar 10 22:15:57 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: tstamp_mode : ENABLE
Mar 10 22:15:57 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: tstamp_type : MONOTONIC
Mar 10 22:15:57 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_step : 1
Mar 10 22:15:58 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: avail_min : 15665
Mar 10 22:15:59 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: period_event : 0
Mar 10 22:15:59 miro-msi pulseaudio[1891]: [alsa-sink-ALC892 Analog] alsa-util.c: start_threshold : -1
Mar 10 22:17:01 miro-msi rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="894" x-info="http://www.rsyslog.com"] start
Mar 10 22:17:00 miro-msi rsyslogd-2222: command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ]
Mar 10 22:17:01 miro-msi rsyslogd: rsyslogd's groupid changed to 108
Mar 10 22:17:01 miro-msi rsyslogd: rsyslogd's userid changed to 104
Mar 10 22:17:01 miro-msi systemd-modules-load[242]: Inserted module 'lp'
Mar 10 22:17:01 miro-msi systemd-modules-load[242]: Inserted module 'ppdev'
Mar 10 22:17:01 miro-msi systemd-modules-load[242]: Inserted module 'parport_pc'
Mar 10 22:17:01 miro-msi loadkeys[248]: Loading /etc/console-setup/cached.kmap.gz
Mar 10 22:17:01 miro-msi systemd[1]: Started Set console keymap.
Mar 10 22:17:01 miro-msi systemd[1]: Started Create Static Device Nodes in /dev.
Mar 10 22:17:01 miro-msi rsyslogd-2039: Could not open output pipe '/dev/xconsole':: No such file or directory [v8.16.0 try http://www.rsyslog.com/e/2039 ]
Mar 10 22:17:01 miro-msi systemd[1]: Starting udev Kernel Device Manager...
Mar 10 22:17:01 miro-msi kernel: [ 0.000000] Initializing cgroup subsys cpuset
Mar 10 22:17:01 miro-msi kernel: [ 0.000000] Initializing cgroup subsys cpu
Mar 10 22:17:01 miro-msi systemd[1]: Started Apply Kernel Variables.
问题
您在日志中看到任何问题了吗?我可以在 Android Studio 或 Gradle 中开始记录一些更详细的日志吗?我的一位同事说我的问题听起来像是内核崩溃,可能是这样吗?
可能重复:
Ubuntu 14.04 使用 Android Studio 时挂起
有趣的巧合——我也有一部索尼手机,只是型号不同。我有一部索尼 Xperia Z2。所以也许这是另一个线索
答案1
强烈建议使用 8GB 以上的 RAM,如果能负担得起,16GB 就不错了,支持 3200DDR4 就更好了
我也遇到过同样的问题,我的笔记本电脑是新的。规格还不错。
然后,为什么它就挂了/冻结了???嗯,就我个人而言,我没有发现任何有关 ubuntu 系统故障或其他磁盘问题的问题。
经过多次研究,我发现这是因为硬件加速问题带有 nvidia 显卡。(当我们运行应用程序/模拟器时)
必须阅读一次并尝试一下 -Android 模拟器
如果上述链接无法解决问题,可以通过 2 个解决方案轻松解决此问题 -
解决方案 1.--------------------------------------------------------------------------------
- 转到工具>> AVD 管理器并删除您的设备。
转到 SDK 管理器删除 API30/31 最新 API(来自 SDK 平台),可用于创建他们的 AVD 设备。
还从 SDK 工具中删除(取消选中)“Android SDK 构建工具和 Android Auto API 模拟器以及其他 Android 模拟器相关的 SDK”。
然后,应用更改并保存,然后重新启动 android Android studio 并再次执行相同的过程来安装该 SDK。
如果 SDK 以某种方式损坏,就会导致该问题。
在创建 AVD 设备期间必须在“Graphic”选择下选择“Hardware-GLES”。
现在,您的设备已准备好运行。
如果问题仍然存在,请转到解决方案 2-
解决方案 2----------------------------------------------------------------- (保存你的项目并重新安装完整的 Android Studio-)
我必须建议你安装一个速度良好的有线互联网连接。“网速慢是问题”
- 卸载 Android Studio 后,请执行以下操作进行清理-
sudo apt-get autoremove sudo apt-get autoclean sudo apt-get update
然后,使用以下方式安装 android studioUbuntu 软件或者任何您所在的软件商店。
之后,安装必须更新我在之前的解决方案中提到的 SDK。
-----------------------------一些额外的故障排除方法/资源---------------------