Sithira / FlutterRadioPlayer

Flutter Radio Player, A Plugin to handle streaming audio without a hassle
BSD 3-Clause "New" or "Revised" License
137 stars 63 forks source link

Execution failed for task ':flutter_radio_player:compileDebugKotlin'. #77

Closed jcontri-otimizer closed 1 year ago

jcontri-otimizer commented 1 year ago

Error below, happened after upgrading flutter from v1 to v2

`e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (22, 17): Unresolved reference: localbroadcastmanager e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (34, 93): Unresolved reference: broadcastActionName e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (35, 93): Unresolved reference: broadcastChangedMetaDataName e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (50, 49): Unresolved reference: LocalBroadcastManager e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (54, 42): Unresolved reference: broadcastActionName e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (55, 50): Unresolved reference: broadcastChangedMetaDataName e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (151, 33): Unresolved reference: LocalBroadcastManager e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (198, 44): Unresolved reference: EventListener e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (200, 13): 'onPlayerStateChanged' overrides nothing e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (227, 13): 'onPlayerError' overrides nothing e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (236, 28): Type mismatch: inferred type is but Player.Listener was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (242, 17): Unresolved reference: addMetadataOutput e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (243, 31): Unresolved reference: it e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (248, 63): Unresolved reference: createWithNotificationChannel e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (313, 37): Unresolved reference: setFastForwardIncrementMs e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (314, 37): Unresolved reference: setRewindIncrementMs e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (316, 37): Unresolved reference: setUseNavigationActions e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (317, 37): Unresolved reference: setUseNavigationActionsInCompactView e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (375, 52): Unresolved reference: broadcastActionName e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (386, 87): Type mismatch: inferred type is Uri! but MediaItem was expected e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_radio_player-2.0.0\android\src\main\kotlin\me\sithiramunasinghe\flutter\flutter_radio_player\core\StreamingCore.kt: (387, 97): Type mismatch: inferred type is Uri! but MediaItem was expected

FAILURE: Build failed with an exception.

TuupleMasterAndroid commented 1 year ago

Same issue here. Only add the plugin and run the project. Display the error. No Code add.

markfili commented 1 year ago

@TuupleMasterAndroid @jcontri-otimizer see https://github.com/Sithira/FlutterRadioPlayer/issues/75#issuecomment-1404363282

adarshskumar commented 1 year ago

How to fix this?

markfili commented 1 year ago

How to fix this?

You could wait for @Sithira to fix it or you could fork this repo and delete the StreamingCore.kt file (see my comments at the end of #75) from the package or you could use my fork of the package but I must warn you I have done some things that were required by my use-case, but you could give it a try (https://github.com/Sithira/FlutterRadioPlayer/pull/78) or just see how this error was fixed

adarshskumar commented 1 year ago

Thankyou

On Tue, Feb 7, 2023 at 3:27 PM Marko Filipović @.***> wrote:

How to fix this?

You could wait for @Sithira https://github.com/Sithira to fix it or you could fork this repo and delete the StreamingCore.kt file (see my comments at the end of #75 https://github.com/Sithira/FlutterRadioPlayer/issues/75) from the package or you could use my fork of the package but I must warn you I have done some things that were required by my use-case, but you could give it a try (#78 https://github.com/Sithira/FlutterRadioPlayer/pull/78) or just see how this error was fixed

— Reply to this email directly, view it on GitHub https://github.com/Sithira/FlutterRadioPlayer/issues/77#issuecomment-1420495338, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSZ4HEOXVGAMKL2N32SDT3WWIL65ANCNFSM6AAAAAATVQV4MU . You are receiving this because you commented.Message ID: @.***>

adarshskumar commented 1 year ago

Is this package works on Android 13? This is not working fine on android 13 and working on every other versions . Anyone knows the reason??

Sithira commented 1 year ago

This should be fixed by the new update. Sorry for delay everyone. Reopen if needed