You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
The problems appear when i try to use them together.
Flutter doctor:
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Linux, locale es_ES.UTF-8)
• Flutter version 1.9.1+hotfix.6 at /home/fsalguero/software/flutter
• Framework revision 68587a0916 (hace 3 meses), 2019-09-13 19:46:58 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /home/fsalguero/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /home/fsalguero/software/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Android Studio (version 3.5)
• Android Studio at /home/fsalguero/software/android-studio
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.40.2)
• VS Code at /usr/share/code
• Flutter extension version 3.7.1
[✓] Connected device (1 available)
• SM A505FN • R58M76BADQK • android-arm64 • Android 9 (API 28)
• No issues found!
Versions from pubspec.yaml:
speech_recognition: ^0.3.0+1
workmanager: ^0.1.5
I get this error on execution:
D/AndroidRuntime( 3241): Shutting down VM
E/AndroidRuntime( 3241): FATAL EXCEPTION: main
E/AndroidRuntime( 3241): Process: com.zink.trackely, PID: 3241
E/AndroidRuntime( 3241): java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.app.Activity.getApplicationContext()' on a null object reference
E/AndroidRuntime( 3241): at bz.rxla.flutter.speechrecognition.SpeechRecognitionPlugin.<init>(SpeechRecognitionPlugin.java:46)
E/AndroidRuntime( 3241): at bz.rxla.flutter.speechrecognition.SpeechRecognitionPlugin.registerWith(SpeechRecognitionPlugin.java:38)
E/AndroidRuntime( 3241): at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:40)
E/AndroidRuntime( 3241): at com.zink.trackely.Application.registerWith(Application.kt:15)
E/AndroidRuntime( 3241): at be.tramckrijte.workmanager.BackgroundWorker$doWork$1.run(BackgroundWorker.kt:75)
E/AndroidRuntime( 3241): at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime( 3241): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 3241): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime( 3241): at android.app.ActivityThread.main(ActivityThread.java:7076)
E/AndroidRuntime( 3241): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 3241): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime( 3241): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
I/Process ( 3241): Sending signal. PID: 3241 SIG: 9
Lost connection to device.
The text was updated successfully, but these errors were encountered:
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Linux, locale es_ES.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.41.1)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This issue is the same described in:
fluttercommunity/flutter_workmanager#120
and
#71
Work manager crashes if speech recognition is imported in the app.
If i use speech_recognition without workmanager, everything works fine just adding it in the pubspec.yaml
When i try to use workmanager its also working. For that, in addition to the pubspec.yaml dependecy, it requires some more changes
In AndroidManifest.xml, i changed:
for:
and created Application.kt:
Flutter doctor:
Versions from pubspec.yaml:
I get this error on execution:
The text was updated successfully, but these errors were encountered: