flutter-moum / flutter_hardware_buttons

Flutter plugin for detecting all hardware buttons
MIT License
37 stars 47 forks source link

Execution failed for task ':hardware_buttons:compileDebugKotlin'. > Compilation error. See log for more details #55

Open TimoZuerner opened 3 years ago

TimoZuerner commented 3 years ago

After adding this to my code it does not work anymore.

`import 'package:hardware_buttons/hardware_buttons.dart'; StreamSubscription _volumeButtonSubscription; //Volume button

@override void initState() { super.initState(); _volumeButtonSubscription = volumeButtonEvents.listen((VolumeButtonEvent event) { if (event == VolumeButtonEvent.VOLUME_UP) { minViewer += 5; maxViewer += 5; } else if (event == VolumeButtonEvent.VOLUME_DOWN && minViewer >= 6) { minViewer -= 5; maxViewer -= 5; } }); }

@override void dispose() { super.dispose(); _volumeButtonSubscription?.cancel(); } `

Full Error:

`Launching lib\main.dart on M2007J20CG in debug mode... Running Gradle task 'assembleDebug'... e: D:\Development\flutter.pub-cache\hosted\pub.dartlang.org\hardware_buttons-1.0.0\android\src\main\kotlin\flutter\moum\hardware_buttons\EmptyActivityLifecycleCallbacks.kt: (8, 6): Class 'EmptyActivityLifecycleCallbacks' is not abstract and does not implement abstract member public abstract fun onActivityPaused(@NonNull p0: Activity): Unit defined in android.app.Application.ActivityLifecycleCallbacks e: D:\Development\flutter.pub-cache\hosted\pub.dartlang.org\hardware_buttons-1.0.0\android\src\main\kotlin\flutter\moum\hardware_buttons\EmptyActivityLifecycleCallbacks.kt: (9, 5): 'onActivityPaused' overrides nothing e: D:\Development\flutter.pub-cache\hosted\pub.dartlang.org\hardware_buttons-1.0.0\android\src\main\kotlin\flutter\moum\hardware_buttons\EmptyActivityLifecycleCallbacks.kt: (11, 5): 'onActivityResumed' overrides nothing e: D:\Development\flutter.pub-cache\hosted\pub.dartlang.org\hardware_buttons-1.0.0\android\src\main\kotlin\flutter\moum\hardware_buttons\EmptyActivityLifecycleCallbacks.kt: (13, 5): 'onActivityStarted' overrides nothing e: D:\Development\flutter.pub-cache\hosted\pub.dartlang.org\hardware_buttons-1.0.0\android\src\main\kotlin\flutter\moum\hardware_buttons\EmptyActivityLifecycleCallbacks.kt: (15, 5): 'onActivityDestroyed' overrides nothing e: D:\Development\flutter.pub-cache\hosted\pub.dartlang.org\hardware_buttons-1.0.0\android\src\main\kotlin\flutter\moum\hardware_buttons\EmptyActivityLifecycleCallbacks.kt: (17, 5): 'onActivitySaveInstanceState' overrides nothing e: D:\Development\flutter.pub-cache\hosted\pub.dartlang.org\hardware_buttons-1.0.0\android\src\main\kotlin\flutter\moum\hardware_buttons\EmptyActivityLifecycleCallbacks.kt: (19, 5): 'onActivityStopped' overrides nothing e: D:\Development\flutter.pub-cache\hosted\pub.dartlang.org\hardware_buttons-1.0.0\android\src\main\kotlin\flutter\moum\hardware_buttons\EmptyActivityLifecycleCallbacks.kt: (21, 5): 'onActivityCreated' overrides nothing e: D:\Development\flutter.pub-cache\hosted\pub.dartlang.org\hardware_buttons-1.0.0\android\src\main\kotlin\flutter\moum\hardware_buttons\HardwareButtonsWatcherManager.kt: (74, 42): Object is not abstract and does not implement abstract base class member public abstract fun onActivityStarted(@NonNull p0: Activity): Unit defined in flutter.moum.hardware_buttons.EmptyActivityLifecycleCallbacks

FAILURE: Build failed with an exception.

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

shinewanna commented 3 years ago

I'm also having this issue.

ajaygosh102 commented 3 years ago

Is there any solution?. I am having the same issue.

agusawa commented 3 years ago

I'm also having the same issue

ravidewanga commented 3 years ago

I'm also having this issue.

henryarm commented 3 years ago

I'm also having this issue.

syedahmedusman2 commented 2 years ago

I am also having this issue