cmdrootaccess / another-flushbar

A flexible widget for user notification. Customize your text, button, duration, animations and much more. For Android devs, it is made to replace Snackbars and Toasts.
https://pub.dev/packages/another_flushbar
MIT License
146 stars 90 forks source link

Build Fails #23

Closed Tobi696 closed 3 years ago

Tobi696 commented 3 years ago

I have a dependency another_flushbar leading to following entry in the generated_plugin_registrant.dart file:

import 'package:another_flushbar/flushbar.dart';

void registerPlugins(Registrar registrar) {
  AnotherFlushbarPlugin.registerWith(registrar);
  registrar.registerMessageHandler();
}

The linter shows the error Undefined name 'AnotherFlushbarPlugin'. Try correcting the name to one that is defined, or defining the name. which is absolutely correct because the class referenced doesn't exist in the imported file.

When I try to build, I get following errors:

Launching lib/main.dart on sdk gphone x86 arm in debug mode...
Plugin project :location_web not found. Please update settings.gradle.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     /Users/tobiaswimmer/Documents/Development/fakks/consumer/build/location/intermediates/library_manifest/debug/AndroidManifest.xml:11:9-15:56: AAPT: error: attribute android:foregroundServiceType not found.

* 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 8s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin another_flushbar...

FAILURE: Build failed with an exception.

* What went wrong:
Task 'assembleAarRelease' not found in root project 'another_flushbar'.

* Try:
Run gradlew tasks to get a list of available tasks. 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 657ms
Exception: The plugin another_flushbar could not be built due to the issue above.
Exited (sigterm)

How can I fix this issue?

cmdrootaccess commented 3 years ago

which version are you using ?

Tobi696 commented 3 years ago

@cmdrootaccess Flutter stable v2.0.4

cmdrootaccess commented 3 years ago

i mean of this library ? the latest is another_flushbar: ^1.10.17 also that seems to be an issue with your project setup. try this https://stackoverflow.com/questions/62348554/plugin-project-location-web-not-found-please-update-settings-gradle-how-do-i

Tobi696 commented 3 years ago

I just upgraded from version 1.10.12 to 1.10.17, now I get another error message but it isn't related to your package anymore. Thanks for your help!