I am trying to translate text. But when I call function language translator or download model the app crash and exit with this console message.
E/flutter ( 8978): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.NoSuchMethodError: No virtual method setDefaults(I)V in class Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig; or its super classes (declaration of 'com.google.firebase.remoteconfig.FirebaseRemoteConfig' appears in /data/app/com.magpie.tryttimethree-OB_Erp5cx5itrWX_HJ3-Pg==/base.apk)
E/flutter ( 8978): at com.google.firebase.ml.naturallanguage.translate.internal.zzab$zza.<init>(com.google.firebase:firebase-ml-natural-language-translate@@22.0.0:3)
E/flutter ( 8978): at com.google.firebase.ml.naturallanguage.translate.zzm.create(com.google.firebase:firebase-ml-natural-language-translate@@22.0.0:2)
E/flutter ( 8978): at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0(ComponentRuntime.java:132)
E/flutter ( 8978): at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(Unknown Source:4)
E/flutter ( 8978): at com.google.firebase.components.Lazy.get(Lazy.java:53)
E/flutter ( 8978): at com.google.firebase.components.AbstractComponentContainer.get(AbstractComponentContainer.java:27)
E/flutter ( 8978): at com.google.firebase.components.ComponentRuntime.get(ComponentRuntime.java:45)
E/flutter ( 8978): at com.google.firebase.components.RestrictedComponentContainer.get(RestrictedComponentContainer.java:89)
E/flutter ( 8978): at com.google.firebase.ml.naturallanguage.translate.zzl.create(com.google.firebase:firebase-ml-natural-language-translate@@22.0.0:4)
E/flutter ( 8978): at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0(ComponentRuntime.java:132)
E/flutter ( 8978): at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(Unknown Source:4)
E/flutter ( 8978): at com.google.firebase.components.Lazy.get(Lazy.java:53)
E/flutter ( 8978): at com.google.firebase.components.AbstractComponentContainer.get(AbstractComponentContainer.java:27)
E/flutter ( 8978): at com.google.firebase.components.ComponentRuntime.get(ComponentRuntime.java:45)
E/flutter ( 8978): at com.google.firebase.components.RestrictedComponentContainer.get(RestrictedComponentContainer.java:89)
E/flutter ( 8978): at com.google.firebase.ml.naturallanguage.translate.zzj.create(com.google.firebase:firebase-ml-natural-language-translate@@22.0.0:10)
E/flutter ( 8978): at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0(ComponentRuntime.java:132)
E/flutter ( 8978): at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(Unknown Source:4)
E/flutter ( 8978): at com.google.firebase.components.Lazy.get(Lazy.java:53)
E/flutter ( 8978): at com.google.firebase.ml.naturallanguage.FirebaseNaturalLanguage.getTranslator(com.google.firebase:firebase-ml-natural-language@@22.0.0:8)
E/flutter ( 8978): at io.flutter.plugins.firebase_mlkit_language.LanguageTranslator.handleEvent(LanguageTranslator.java:42)
E/flutter ( 8978): at io.flutter.plugins.firebase_mlkit_language.FirebaseMlkitLanguagePlugin.onMethodCall(FirebaseMlkitLanguagePlugin.java:30)
E/flutter ( 8978): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/flutter ( 8978): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/flutter ( 8978): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/flutter ( 8978): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter ( 8978): at android.os.MessageQueue.next(MessageQueue.java:336)
E/flutter ( 8978): at android.os.Looper.loop(Looper.java:181)
E/flutter ( 8978): at android.app.ActivityThread.main(ActivityThread.java:7590)
E/flutter ( 8978): at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 8978): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
E/flutter ( 8978): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
E/flutter ( 8978):
F/flutter ( 8978): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).
F/libc ( 8978): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 8978 (e.tryttimethree), pid 8978 (e.tryttimethree)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'xiaomi/lavender/lavender:10/QKQ1.190910.002/V12.0.2.0.QFGINXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2021-02-13 19:30:56+0600
pid: 8978, tid: 8978, name: e.tryttimethree >>> com.magpie.tryttimethree <<<
uid: 10400
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).
'
x0 0000000000000000 x1 0000000000002312 x2 0000000000000006 x3 0000007fc6bec330
x4 0000000000008000 x5 0000000000008000 x6 0000000000008000 x7 0080000000000000
x8 00000000000000f0 x9 f7084ff283aa2d99 x10 0000000000000001 x11 0000000000000000
x12 fffffff0fffffbdf x13 0000000000000003 x14 0000000000000001 x15 000075e4de14942d
x16 0000006fdb5c68c0 x17 0000006fdb5a2a50 x18 0000006fddb30000 x19 0000000000002312
x20 0000000000002312 x21 00000000ffffffff x22 0000006f3e89d3d8 x23 0000006ed1e05898
x24 0000000000000039 x25 0000006fdd06e020 x26 0000000000000000 x27 0000000000000039
x28 0000000000000001 x29 0000007fc6bec3d0
sp 0000007fc6bec310 lr 0000006fdb5540c4 pc 0000006fdb5540f0
backtrace:
#00 pc 00000000000830f0 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 2c487d731e53ae37d22c60e8244291f5)
#01 pc 0000000001287244 /data/app/com.magpie.tryttimethree-OB_Erp5cx5itrWX_HJ3-Pg==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
#02 pc 00000000000020dc [anon:.bss]
My code-
String inputText = 'I am a student';
var result = await FirebaseLanguage.instance
.languageTranslator(
SupportedLanguages.English, SupportedLanguages.Bengali)
.processText(inputText);
print(result);
I also tried to download a model. Same crash.
Dependencies of app/build.gradle -
I am trying to translate text. But when I call function language translator or download model the app crash and exit with this console message.
My code-
I also tried to download a model. Same crash. Dependencies of app/build.gradle -