Android-创建和/或启动热词识别时出错

时间:2018-09-06 02:41:29

标签: android firebase firebase-realtime-database android-studio-3.0

我正在使用Firebase数据库存储数据。使用DataSnapshot取回数据时,我的logcat显示此错误

09-06 07:55:01.782 7940-7940/? E/HotwordDetector: Error at creating and/or starting hotword recognition.
    java.lang.IllegalArgumentException: Error parsing hotword data buffer
        at com.google.speech.micro.GoogleHotwordData.nativeNew(Native Method)
        at com.google.speech.micro.GoogleHotwordData.<init>(SourceFile:4)
        at com.google.android.apps.gsa.speech.microdetection.a.a.a.b(SourceFile:14)
        at com.google.android.libraries.assistant.hotword.f.a(SourceFile:47)
        at com.google.android.libraries.assistant.hotword.f.Lh(SourceFile:33)
        at com.google.android.apps.gsa.voiceinteraction.hotword.a.dpg(SourceFile:34)
        at com.google.android.voiceinteraction.GsaVoiceInteractionService.dpg(SourceFile:106)
        at com.google.android.voiceinteraction.l.onServiceConnected(SourceFile:72)
        at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1329)
        at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1346)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:179)
        at android.app.ActivityThread.main(ActivityThread.java:5730)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:681)
09-06 07:55:01.782 7940-7940/? E/GsaVoiceInteractionSrv: Failed to perform next action.

尽管我的应用程序运行正常且数据正在正确检索,但每个查询都会重复同样的错误。只想知道此错误的原因

我的代码

 private void loadUserData(String user_uid) {
        mDatabaseReference.child(user_uid).child("User").addValueEventListener(new ValueEventListener() {
            @Override
            public void onDataChange(DataSnapshot dataSnapshot) {
               String name = dataSnapshot.child("Name").getValue().toString();
               String department = dataSnapshot.child("Dept").getValue().toString();

                etName.setText(name);
                etDept.setText(dept);
            }

            @Override
            public void onCancelled(DatabaseError databaseError) {

            }
        });
    }

1 个答案:

答案 0 :(得分:0)

此错误与Firebase或您的代码无关。 这取决于您的设备的操作系统,该设备现已实施Google并将其显示为错误。