简体   繁体   English

Android模拟器上的循环错误

[英]Looping Error on Android Emulator

I can't seem to launch any of my apps in my Android emulator because every ~2 seconds this error pops up, and I believe this is making my app crash... 我似乎无法在我的Android模拟器中启动任何应用程序,因为每次出现此错误大约2秒钟,我相信这会让我的应用程序崩溃...

Note: I've never once tried to record audio, which I think it's trying to do... so why is it displaying this? 注意:我从来没有尝试过录制音频,我认为它正在尝试...所以为什么要显示这个? Though I was trying to open a 3D model into JPCT-AE with an inputstream that never worked! 虽然我试图用一个从未奏效的输入流打开JPCT-AE的3D模型!

The error: 错误:

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

As I said before, this is popping up every ~2 seconds... What could be causing this? 正如我之前所说的那样,每隔约2秒钟就出现一次......这可能是什么原因引起的? I've tried to restart the emulator multiple times and this keeps coming up!! 我试过多次重启模拟器,这一直在上升!

EDIT: I've also deleted and recreated the emulator and still same errors 编辑:我也删除并重新创建了模拟器,但仍然存在相同的错误

Please help me!! 请帮我!! Thanks to all in advance :) 感谢所有提前:)

Android is trying to listen on the microphone, which isn't available on the emulator, so it fills logcat with useless stack traces. Android正试图收听模拟器上没有的麦克风,所以它用无用的堆栈跟踪填充logcat。 To stop this, go to the Settings app in Android, and click: 要停止此操作,请转到Android中的“设置”应用,然后点击:

  1. Apps and notifications 应用和通知
  2. App permissions 应用权限
  3. Microphone 麦克风

Then disallow microphone use for all the apps. 然后禁止所有应用程序使用麦克风。

Although disabling Microphone removed some of the errors , Disabling Quick Search App worked for me as suggested by OOI . 虽然禁用麦克风删除了一些错误,但禁用快速搜索应用程序对我来说是按照OOI的建议。

Settings >> Apps & Notifications >> All Apps >> Google 设置>>应用和通知>>所有应用>> Google

在此输入图像描述

That com.google.android.googlequicksearchbox is Google app . com.google.android.googlequicksearchboxGoogle应用

Simply disabling it in Settings worked for me. 在“设置”中简单地禁用它对我有用。

以下是在模拟器中禁用热门词检测(“Ok Google”)应用的方法:

./adb shell "su root pm disable com.google.android.googlequicksearchbox"

In my case I fixed this first time by adding: 在我的情况下,我第一次通过添加:

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

in AndroidManifest.xml AndroidManifest.xml中

and updating the google.android.gms packages used in the project to the latest version in build.gradle file: 并将项目中使用的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;
}

UPDATE : Later, after an update of RN from 0.45 RN to 0.53 I found that the RECORD_AUDIO can be removed (if not used) with adding play-services-location and the play-services-base as below: 更新 :稍后,在RN从0.45 RN更新到0.53之后,我发现RECORD_AUDIO可以通过添加play-services-locationplay-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;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM