pusher / push-notifications-flutter

Official Pusher Beams Flutter client plugin (iOS, Android and Web), receive notifications easily on your Flutter application with Pusher Beams.
https://pub.dev/packages/pusher_beams
MIT License
10 stars 27 forks source link

Execution failed for task ':pusher_beams_android:compileDebugKotlin'. #31

Closed chitraarasu closed 2 years ago

chitraarasu commented 2 years ago

FYI this issue is still going on. Temporary workaround for me is downgrading to pusher_beams: ^1.0.2 and making sure the pub cache corrects the android version to pusher_beams_android-1.0.2 (which, for me at least, doesn't present this problem) by running flutter pub cache repair and flutter clean.

Originally posted by @thassio-vinicius in https://github.com/pusher/push-notifications-flutter/issues/28#issuecomment-1201592684

It is not working. I am facing the same issue I tried the older versions too.

C:\src\flutter\flutter.pub-cache\hosted\pub.dartlang.org\pusher_beams_android-1.1.0\android\src\main\kotlin\com\pusher\pusher_beams\PusherBeamsPlugin.kt: (23, 1): Class 'PusherBeamsPlugin' is not abstract and does not implement abstract member public abstract fun onNewIntent(p0: Intent): Boolean defined in io.flutter.plugin.common.PluginRegistry.NewIntentListener e: C:\src\flutter\flutter.pub-cache\hosted\pub.dartlang.org\pusher_beams_android-1.1.0\android\src\main\kotlin\com\pusher\pusher_beams\PusherBeamsPlugin.kt: (45, 5): 'onNewIntent' overrides nothing

FAILURE: Build failed with an exception.

BUILD FAILED in 35s Exception: Gradle task assembleDebug failed with exit code 1

thassio-vinicius commented 2 years ago

based on the error message you posted, it seems that your pusher_beams_android version, which is the root of the problem, is still set to 1.1.0, the faulty version. You need to make sure it's set to 1.0.2. After changing pusher_beams version to 1.0.2 in pubspec.yaml delete your pubspec.lock file and run flutter clean, flutter pub get and flutter pub cache repair

TitanKing commented 2 years ago

Even with this, it somehow forces the plugin back to 1.1.0. Just realized this plugin would probably not work for me as such a serious issues takes so long to fix. I guess Pubnub is the answer then.