51

我似乎无法在我的 Android 模拟器中启动我的任何应用程序,因为每隔约 2 秒就会弹出一次此错误,我相信这会使我的应用程序崩溃......

注意:我从来没有尝试过录制音频,我认为它正在尝试这样做......那为什么会显示这个?虽然我试图用一个从未工作过的输入流将 3D 模型打开到 JPCT-AE 中!

错误:

04-01 21:02:29.798 2160-2160/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: Micro detection mode: [mDetectionMode: [1]].
04-01 21:02:29.798 2160-2160/com.google.android.googlequicksearchbox:search I/AudioController: Using mInputStreamFactoryBuilder
04-01 21:02:29.805 2160-3055/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Starting detection.
04-01 21:02:29.805 2160-2204/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_starting com.google.android.apps.gsa.staticplugins.z.c@652d8ac
04-01 21:02:29.806 1302-1640/? W/APM_AudioPolicyManager: getInputForAttr() failed opening input: samplingRate 16000, format 1, channelMask 10
04-01 21:02:29.806 2160-2204/com.google.android.googlequicksearchbox:search E/AudioRecord: Could not get audio input for session 441, record source 1999, sample rate 16000, format 0x1, channel mask 0x10, flags 0
04-01 21:02:29.807 2160-2204/com.google.android.googlequicksearchbox:search E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -22.
04-01 21:02:29.807 2160-2204/com.google.android.googlequicksearchbox:search E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
04-01 21:02:29.807 2160-2204/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_started com.google.android.apps.gsa.staticplugins.z.c@652d8ac

                                                                                                     --------- beginning of system
04-01 21:02:29.808 2160-2204/com.google.android.googlequicksearchbox:search E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
04-01 21:02:29.809 2160-2160/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: onReady
04-01 21:02:29.844 2160-2204/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_close com.google.android.apps.gsa.staticplugins.z.c@652d8ac
04-01 21:02:29.844 2160-3055/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Detection finished
04-01 21:02:29.844 2160-3055/com.google.android.googlequicksearchbox:search W/ErrorReporter: reportError [type: 211, code: 524300]: Error reading from input stream
04-01 21:02:29.845 2160-2353/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Stopping hotword detection.
04-01 21:02:29.846 2160-3055/com.google.android.googlequicksearchbox:search W/ErrorProcessor: onFatalError, processing error from engine(4)
                                                                                              com.google.android.apps.gsa.shared.speech.a.g: Error reading from input stream
                                                                                                  at com.google.android.apps.gsa.staticplugins.recognizer.i.a.a(SourceFile:342)
                                                                                                  at com.google.android.apps.gsa.staticplugins.recognizer.i.a$1.run(SourceFile:1367)
                                                                                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
                                                                                                  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
                                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                                                  at java.lang.Thread.run(Thread.java:761)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85)
                                                                                               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.g(SourceFile:2531)
                                                                                                  at com.google.android.apps.gsa.speech.audio.ap.read(SourceFile:555)
                                                                                                  at java.io.InputStream.read(InputStream.java:101)
                                                                                                  at com.google.android.apps.gsa.speech.audio.al.run(SourceFile:362)
                                                                                                  at com.google.android.apps.gsa.speech.audio.ak$1.run(SourceFile:471)
                                                                                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
                                                                                                  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
                                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
                                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
                                                                                                  at java.lang.Thread.run(Thread.java:761) 
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85) 
04-01 21:02:29.846 2160-3055/com.google.android.googlequicksearchbox:search I/AudioController: internalShutdown
04-01 21:02:29.847 2160-2160/com.google.android.googlequicksearchbox:search I/MicroDetector: Keeping mic open: false
04-01 21:02:29.847 2160-2160/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: #onError(false)
04-01 21:02:29.847 2160-3054/com.google.android.googlequicksearchbox:search I/DeviceStateChecker: DeviceStateChecker cancelled

正如我之前所说,这每隔约 2 秒就会弹出一次……这可能是什么原因造成的?我已经尝试多次重新启动模拟器,并且不断出现!

编辑:我还删除并重新创建了模拟器,但仍然有同样的错误

请帮我!!提前感谢大家:)

4

5 回答 5

54

Android 正在尝试在模拟器上不可用的麦克风上收听,因此它用无用的堆栈跟踪填充 logcat。要停止此操作,请转到 Android 中的“设置”应用,然后单击:

  1. 应用程序和通知
  2. 应用权限
  3. 麦克风

然后禁止所有应用程序使用麦克风。

于 2017-06-06T20:32:43.493 回答
33

虽然禁用麦克风消除了一些错误,但禁用快速搜索应用程序对我有用,正如 OOI 所建议的那样。

设置>>应用和通知>>所有应用>>谷歌

在此处输入图像描述

于 2018-01-30T06:26:40.897 回答
7

com.google.android.googlequicksearchbox谷歌应用程序

只需在设置中禁用它对我有用。

于 2018-01-27T11:25:36.683 回答
7

以下是在模拟器中禁用启动指令检测(“Ok Google”)应用程序的方法:

./adb shell "su root pm disable com.google.android.googlequicksearchbox"
于 2018-08-12T23:49:58.810 回答
1

在我的情况下,我第一次通过添加:

<uses-permission android:name="android.permission.RECORD_AUDIO" />

AndroidManifest.xml中

并将项目中使用的 google.android.gms 包更新为build.gradle文件中的最新版本:

compile('com.google.android.gms:play-services-analytics:11.0.4') {
    force = true;
}
compile('com.google.android.gms:play-services-ads:11.0.4') {
    force = true;
}
compile('com.google.android.gms:play-services-gcm:11.0.4') {
    force = true;
}

更新:后来,在将 RN 从 0.45 RN 更新到 0.53 后,我发现 RECORD_AUDIO 可以通过添加删除(如果不使用),play-services-location如下play-services-base所示:

compile('com.google.android.gms:play-services-analytics:11.0.4') {
    force = true;
}

compile('com.google.android.gms:play-services-ads:11.0.4') {
    force = true;
}

compile('com.google.android.gms:play-services-gcm:11.0.4') {
    force = true;
}

compile('com.google.android.gms:play-services-location:11.0.4') {
    force = true;
}

compile('com.google.android.gms:play-services-base:11.0.4') {
    force = true;
}
于 2017-08-02T13:44:12.730 回答