Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    bagisto mobile not working and giving error on flutter run

    General Discussion
    2
    2
    419
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      marwan.dalaty last edited by

      hi after following all the installation steps for bagisto on mobile android, when i reach the step to run flutter run, I'm getting the below error

      Launching lib/main.dart on SM A536E in debug mode...
      You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply

      You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply

      lib/screens/product_screen/view/product_image_view.dart:41:36: Error: 'CarouselController' is imported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'.
      final buttonCarouselController = CarouselController();
      ^^^^^^^^^^^^^^^^^^
      ../../../.pub-cache/hosted/pub.dev/carousel_slider-4.2.1/lib/carousel_slider.dart:9:1: Error: 'CarouselController' is imported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'.
      import 'carousel_controller.dart';
      ^^^^^^^^^^^^^^^^^^
      ../../../.pub-cache/hosted/pub.dev/carousel_slider-4.2.1/lib/carousel_slider.dart:48:15: Error: 'CarouselController' is imported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'.
      : CarouselController() as CarouselControllerImpl,
      ^^^^^^^^^^^^^^^^^^
      ../../../.pub-cache/hosted/pub.dev/carousel_slider-4.2.1/lib/carousel_slider.dart:62:15: Error: 'CarouselController' is imported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'.
      : CarouselController() as CarouselControllerImpl,
      ^^^^^^^^^^^^^^^^^^
      lib/screens/product_screen/view/downloadable_product_sample.dart:35:36: Error: 'CarouselController' is imported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'.
      final buttonCarouselController = CarouselController();
      ^^^^^^^^^^^^^^^^^^
      lib/screens/product_screen/view/downloadable_product_options.dart:34:36: Error: 'CarouselController' is imported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'.
      final buttonCarouselController = CarouselController();
      ^^^^^^^^^^^^^^^^^^
      Target kernel_snapshot_program failed: Exception

      FAILURE: Build failed with an exception.

      • Where:
        Script '/home/marwan/snap/flutter/common/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1687

      • What went wrong:
        Execution failed for task ':app:compileFlutterBuildDebug'.

      Process 'command '/home/marwan/snap/flutter/common/flutter/bin/flutter'' finished with non-zero exit value 1

      • 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 3s
      Running Gradle task 'assembleDebug'... 4.3s
      Error: Gradle task assembleDebug failed with exit code 1

      1 Reply Last reply Reply Quote 0
      • Rishabh-Webkul
        Rishabh-Webkul last edited by

        Hello @marwan-dalaty

        Check Your Imports: Ensure you're importing CarouselController only from the carousel_slider package and not from Flutter's material library. The carousel_slider package provides a CarouselController for controlling carousels in your app, and you should not use the one from flutter/src/material/carousel.dart.
        Remove Unnecessary Imports: Make sure you only import the CarouselController from the carousel_sliderpackage. You can do this by checking your import statements and removing the conflicting import.

        Ensure only this import is present

        import 'package:carousel_slider/carousel_slider.dart';

        Remove or comment out the conflicting import

        import 'package:flutter/src/material/carousel.dart';

        1. Check for Duplicate Packages: Sometimes, this issue can arise if you have multiple versions of the same package or a package that has conflicting imports. Ensure your pubspec.yaml file lists only one version of carousel_slider (carousel_slider: ^4.0.0) and there are no unnecessary packages that might be importing CarouselController from conflicting sources.

        Thanks & Regards

        1 Reply Last reply Reply Quote 0
        • First post
          Last post