-
-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal Exception #4
Comments
Hi, the error points to line 218 of pluginRegistrantCallback.registerWith(backgroundFlutterView.getPluginRegistry()); so, most likely |
I've stepped in similar problem myself. Default Flutter app structure doesn't include any custom MainApplication and not being Android developer before I've missed this light remark in the README. There are also a couple of other similar problems which I've finally solved by carefully investigated structure of the Example app and contents of all its files then copied the relevant parts to my app. |
Thanks for the answer. |
@incafox Looks like you didn't put reference to MainApplication to AndroidManifest. The relevant part should look like: <application but you have reference to standard Flutter app (default value). You should inspect manifest carefully as well :-) This was not easy for me! P.S. Next hint - when your app starts partially working and you see the notification to see buttons icons you should copy files from src/res folder as well :-) |
Thankyou!!! so much. :) |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service. |
hi, i was trying to add your plugin to a new project in order to run the example, and i have this error:
(i modified the manifest and adding the MainApplication file)
D/AndroidRuntime( 5855): Shutting down VM
E/AndroidRuntime( 5855): FATAL EXCEPTION: main
E/AndroidRuntime( 5855): Process: com.ryanheise.audioserviceexample, PID: 5855
E/AndroidRuntime( 5855): java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.PluginRegistry$PluginRegistrantCallback.registerWith(io.flutter.plugin.common.PluginRegistry)' on a null object reference
E/AndroidRuntime( 5855): at com.ryanheise.audioservice.AudioServicePlugin$ClientHandler$3.onPlay(AudioServicePlugin.java:218)
E/AndroidRuntime( 5855): at com.ryanheise.audioservice.AudioService$MediaSessionCallback$1.run(AudioService.java:396)
E/AndroidRuntime( 5855): at com.ryanheise.audioservice.AudioService$MediaSessionCallback.play(AudioService.java:411)
E/AndroidRuntime( 5855): at com.ryanheise.audioservice.AudioService$MediaSessionCallback.onPlay(AudioService.java:394)
E/AndroidRuntime( 5855): at android.support.v4.media.session.MediaSessionCompat$Callback$StubApi21.onPlay(MediaSessionCompat.java:1259)
E/AndroidRuntime( 5855): at android.support.v4.media.session.MediaSessionCompatApi21$CallbackProxy.onPlay(MediaSessionCompatApi21.java:194)
E/AndroidRuntime( 5855): at android.media.session.MediaSession$CallbackMessageHandler.handleMessage(MediaSession.java:1407)
E/AndroidRuntime( 5855): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 5855): at android.os.Looper.loop(Looper.java:164)
E/AndroidRuntime( 5855): at android.app.ActivityThread.main(ActivityThread.java:6494)
E/AndroidRuntime( 5855): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 5855): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/AndroidRuntime( 5855): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
i cannot run the example,i can run it only openning the plugin project itself (but obviously that is not the way), what am i doing wrong?
The text was updated successfully, but these errors were encountered: