Skip to content
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

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

Open
TimoZuerner opened this issue Dec 20, 2020 · 6 comments

Comments

@TimoZuerner
Copy link

TimoZuerner commented Dec 20, 2020

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.

  • What went wrong:
    Execution failed for task ':hardware_buttons:compileDebugKotlin'.

Compilation error. See log for more details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

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

@shinewanna
Copy link

I'm also having this issue.

@ajaygosh102
Copy link

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

@agusawa
Copy link

agusawa commented May 1, 2021

I'm also having the same issue

@ravidewanga
Copy link

I'm also having this issue.

1 similar comment
@henryarm
Copy link

I'm also having this issue.

@syedahmedusman2
Copy link

I am also having this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants