我正在使用Android Studio 3.1来编译我的应用。它在首次加载时工作正常,但是如果我关闭应用程序(从应用程序抽屉中)然后重新打开它,它会在启动后立即崩溃,并且无法重新启动。
请注意,这是一个React Native项目,我没有在我的应用中使用Android的任何音频功能:
Android工作室在logcat中给我这些错误。
e/AudioFlinger: Not enough memory for Audiotrack
04-16 09:58:15.508 1561-5451/? E/AudioFlinger: not enough memory for AudioTrack size=131296
04-16 09:58:15.508 1561-5451/? D/MemoryDealer: AudioTrack (0xe837e2e0, size=4194304)
0: 0xe837e2f0 | 0x00000000 | 0x000200E0 | A
1: 0xe837e350 | 0x000200E0 | 0x000200E0 | A
2: 0xe837e4e0 | 0x000401C0 | 0x000200E0 | A
3: 0xe87991e0 | 0x000602A0 | 0x000200E0 | A
4: 0xe8799410 | 0x00080380 | 0x000200E0 | A
5: 0xe837e670 | 0x000A0460 | 0x000200E0 | A
6: 0xe837e840 | 0x000C0540 | 0x000200E0 | A
7: 0xe8799720 | 0x000E0620 | 0x000200E0 | A
8: 0xe87998f0 | 0x00100700 | 0x000200E0 | A
9: 0xe8799a80 | 0x001207E0 | 0x000200E0 | A
10: 0xe8799c00 | 0x001408C0 | 0x000200E0 | A
11: 0xe837eaf0 | 0x001609A0 | 0x000200E0 | A
12: 0xe87992d0 | 0x00180A80 | 0x000200E0 | A
13: 0xe837ec80 | 0x001A0B60 | 0x000200E0 | A
14: 0xe837ee70 | 0x001C0C40 | 0x000200E0 | A
15: 0xe8799e60 | 0x001E0D20 | 0x000200E0 | A
16: 0xe71ee180 | 0x00200E00 | 0x000200E0 | A
17: 0xe71ee360 | 0x00220EE0 | 0x000200E0 | A
18: 0xe71ee4f0 | 0x00240FC0 | 0x000200E0 | A
19: 0xe8799f00 | 0x002610A0 | 0x000200E0 | A
04-16 09:58:15.508 1561-5451/? E/AudioFlinger: createRecordTrack_l() initCheck failed -12; no control block?
04-16 09:58:15.508 2536-7471/com.google.android.googlequicksearchbox:search E/AudioRecord: AudioFlinger could not create record track, status: -12
04-16 09:58:15.511 2536-7471/com.google.android.googlequicksearchbox:search E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -12.
04-16 09:58:15.511 2536-7471/com.google.android.googlequicksearchbox:search E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
04-16 09:58:15.511 2536-7471/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_started com.google.android.apps.gsa.staticplugins.aa.c@4f4786e
04-16 09:58:15.518 2536-7471/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_close com.google.android.apps.gsa.staticplugins.aa.c@4f4786e
04-16 09:58:15.518 2536-5294/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Detection finished
04-16 09:58:15.519 2536-5294/com.google.android.googlequicksearchbox:search W/ErrorReporter: reportError [type: 211, code: 524300]: Error reading from input stream
04-16 09:58:15.519 2536-5294/com.google.android.googlequicksearchbox:search W/ErrorProcessor: onFatalError, processing error from engine(4)
com.google.android.apps.gsa.shared.speech.b.g: Error reading from input stream
at com.google.android.apps.gsa.staticplugins.recognizer.j.a.a(SourceFile:28)
at com.google.android.apps.gsa.staticplugins.recognizer.j.b.run(SourceFile:15)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.google.android.apps.gsa.shared.util.concurrent.a.ag.run(Unknown Source:4)
at com.google.android.apps.gsa.shared.util.concurrent.a.bo.run(SourceFile:4)
at com.google.android.apps.gsa.shared.util.concurrent.a.bo.run(SourceFile:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:6)
Caused by: com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 393238 | Buffer overflow, no available space.
at com.google.android.apps.gsa.speech.audio.Tee.f(SourceFile:103)
at com.google.android.apps.gsa.speech.audio.au.read(SourceFile:2)
at java.io.InputStream.read(InputStream.java:101)
at com.google.android.apps.gsa.speech.audio.ao.run(SourceFile:18)
at com.google.android.apps.gsa.speech.audio.an.run(SourceFile:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.google.android.apps.gsa.shared.util.concurrent.a.ag.run(Unknown Source:4)
at com.google.android.apps.gsa.shared.util.concurrent.a.bo.run(SourceFile:4)
at com.google.android.apps.gsa.shared.util.concurrent.a.bo.run(SourceFile:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:6)
04-16 09:58:15.520 2536-5294/com.google.android.googlequicksearchbox:search I/AudioController: internalShutdown