Fail running on Android Simulator and Device. Run on IOS OK no issue
azaman2204 opened this issue · 7 comments
Try testing the example. OK on IOS simulator and device BUT FAIL on Android Simulator and Device.
See errors below;
Restarted application in 1,312ms.
I/javaClass(31009): Calling to method: initService
I/javaClass(31009): start service invoked
I/javaClass(31009): Attempting to initialize service...
I/javaClass(31009): Service not bound, binding now....
I/javaClass(31009): Mapping method call to player item object
I/flutter (31009): object data: flutter_radio_paused
I/flutter (31009): object data: flutter_radio_paused
I/flutter (31009): 360.0
V/AudioManager(31009): querySoundEffectsEnabled...
I/flutter (31009): button press data: flutter_radio_paused
I/flutter (31009): Invoking platform method: playOrPause
I/javaClass(31009): Calling to method: playOrPause
I/javaClass(31009): Attempting to either play or pause...
I/javaClass(31009): Attempting to get playing status....
E/MethodChannel#flutter_radio_player(31009): Failed to handle method call
E/MethodChannel#flutter_radio_player(31009): kotlin.UninitializedPropertyAccessException: lateinit property coreService has not been initialized
E/MethodChannel#flutter_radio_player(31009): at me.sithiramunasinghe.flutter.flutter_radio_player.FlutterRadioPlayerPlugin.isPlaying(FlutterRadioPlayerPlugin.kt:192)
E/MethodChannel#flutter_radio_player(31009): at me.sithiramunasinghe.flutter.flutter_radio_player.FlutterRadioPlayerPlugin.playOrPause(FlutterRadioPlayerPlugin.kt:199)
E/MethodChannel#flutter_radio_player(31009): at me.sithiramunasinghe.flutter.flutter_radio_player.FlutterRadioPlayerPlugin.onMethodCall(FlutterRadioPlayerPlugin.kt:64)
E/MethodChannel#flutter_radio_player(31009): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#flutter_radio_player(31009): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter_radio_player(31009): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:738)
E/MethodChannel#flutter_radio_player(31009): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_radio_player(31009): at android.os.MessageQueue.next(MessageQueue.java:363)
E/MethodChannel#flutter_radio_player(31009): at android.os.Looper.loop(Looper.java:176)
E/MethodChannel#flutter_radio_player(31009): at android.app.ActivityThread.main(ActivityThread.java:8347)
E/MethodChannel#flutter_radio_player(31009): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_radio_player(31009): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
E/MethodChannel#flutter_radio_player(31009): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
E/flutter (31009): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(error, lateinit property coreService has not been initialized, null, kotlin.UninitializedPropertyAccessException: lateinit property coreService has not been initialized
E/flutter (31009): at me.sithiramunasinghe.flutter.flutter_radio_player.FlutterRadioPlayerPlugin.isPlaying(FlutterRadioPlayerPlugin.kt:192)
E/flutter (31009): at me.sithiramunasinghe.flutter.flutter_radio_player.FlutterRadioPlayerPlugin.playOrPause(FlutterRadioPlayerPlugin.kt:199)
E/flutter (31009): at me.sithiramunasinghe.flutter.flutter_radio_player.FlutterRadioPlayerPlugin.onMethodCall(FlutterRadioPlayerPlugin.kt:64)
E/flutter (31009): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/flutter (31009): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/flutter (31009): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:738)
E/flutter (31009): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (31009): at android.os.MessageQueue.next(MessageQueue.java:363)
E/flutter (31009): at android.os.Looper.loop(Looper.java:176)
E/flutter (31009): at android.app.ActivityThread.main(ActivityThread.java:8347)
E/flutter (31009): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (31009): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
E/flutter (31009): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
E/flutter (31009): )
E/flutter (31009): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
E/flutter (31009): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
E/flutter (31009):
E/flutter (31009): #2 FlutterRadioPlayer.playOrPause (package:flutter_radio_player/flutter_radio_player.dart:45:12)
E/flutter (31009):
E/flutter (31009): #3 _MyAppState.build.. (package:flutter_radio_player_example/main.dart:91:37)
E/flutter (31009):
E/flutter (31009):
I/flutter (31009): 360.0
I/flutter (31009): 360.0
I/flutter (31009): 360.0
I/flutter (31009): 360.0
I/flutter (31009): 360.0
I/flutter (31009): 360.0
I/flutter (31009): 360.0
I/flutter (31009): 360.0
I/flutter (31009): 360.0
I/flutter (31009): 360.0
D/DecorView(31009): showOrHideHighlightView: hasFocus=false; winMode=1; isMrgNull=true
D/RtgSched(31009): resetRtgSchedHandle failed enable:0
W/libEGL (31009): EGLNativeWindowType 0x79bcdfd010 disconnect failed
W/libEGL (31009): EGLNativeWindowType 0x7a1be5abd0 disconnect failed
D/ActivityThread(31009): Remove activity client record, r= ActivityRecord{a12562e token=android.os.BinderProxy@d0e3985 {me.sithiramunasinghe.flutter.flutter_radio_player_example/me.sithiramunasinghe.flutter.flutter_radio_player_example.MainActivity}} token= android.os.BinderProxy@d0e3985
D/ZrHung.AppEyeUiProbe(31009): not watching, wait.
I have the same problem. Look like version 1.07 isn´t stable yet. If I return to version 1.05, the errors gone.
Any idea how to solve this? I really need metadata´s functionality
Well, I had implemented in version 1.05 without a problem. When I update to version 1.07, the bug appears in the build process.
Sithira, that was the problem. I went back to a repository with version 1.05. Uninstall flutter_radio_player, delete the 'build' folder, and run the 'flutter clean' command in my terminal. After that, I installed version 1.07 with no problem.
Thanks for your support.
I still have same issue in Android 30, is there any solution? I try @estebanCaballero70200 solution but not works
@Sithira
Has been updated to v2. Please check the master branch