#
closed
Error whe run de app

Hi i have this error when try to run app.


Launching lib\main.dart on Android SDK built for x86 in debug mode...

Running Gradle task 'assembleDebug'...

lib/main.dart:31:21: Error: Member not found: 'shared'.

    await OneSignal.shared.setAppId(getStringAsync(ONESINGLE, defaultValue: mOneSignalID));

                    ^^^^^^

lib/main.dart:32:15: Error: Member not found: 'shared'.

    OneSignal.shared.consentGranted(true);

              ^^^^^^

lib/main.dart:33:15: Error: Member not found: 'shared'.

    OneSignal.shared.promptUserForPushNotificationPermission();

              ^^^^^^

lib/screen/DashboardScreen.dart:41:54: Error: 'OSNotificationOpenedResult' isn't a type.

      OneSignal.shared.setNotificationOpenedHandler((OSNotificationOpenedResult notification) async {

                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^

lib/screen/DashboardScreen.dart:41:17: Error: Member not found: 'shared'.

      OneSignal.shared.setNotificationOpenedHandler((OSNotificationOpenedResult notification) async {

                ^^^^^^

Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

* Where:

Script 'C:\Users\imapa\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1350

* What went wrong:

Execution failed for task ':app:compileFlutterBuildDebug'.

> Process 'command 'C:\Users\imapa\flutter\bin\flutter.bat'' 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 12s

Exception: Gradle task assembleDebug failed with exit code 1

ATTACHED FILES

Asked 1 year ago on November 16, 2023 6:00 AM Comments 14 times


  1. Generic placeholder image

    Abdullah Patel replied

    For now its all.

    Thanks for your service i liked it.

  2. Generic placeholder image

    Angela replied

    Your issue has been resolved via anydesk and thank you so much for giving review on codecanyon. Let us know if you fave any issues.

    Thanks & Regards
    - Angela
  3. Generic placeholder image

    Angela replied

    Hello Abdullah Patel,

    Sorry for the inconvenience. We had a holiday so we could not reply on time. Please message the ticket when you are available. our working hours (Mon-Sat 9:00 am-6:00 pm (GMT +5:30)).

    Thanks & Regards
    - Angela
  4. Generic placeholder image

    Abdullah Patel replied

    Hi i send the Any Desk information.

    any reply ?

  5. Generic placeholder image

    Angela replied

    Can you please share anydesk or chrome remote access

    Thanks & Regards
    - Angela
  6. Generic placeholder image

    Abdullah Patel replied

    yes in pubspec.yaml 

    I changed it now... 

    when try to run app get this error

    __________________________________

    Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...

    Running Gradle task 'assembleDebug'...

    /C:/Users/imapa/AppData/Local/Pub/Cache/hosted/pub.dev/nb_utils-5.0.8/lib/src/widgets/blur_widget.dart:37:23: Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.

     - 'BorderRadius' is from 'package:flutter/src/painting/border_radius.dart' ('/C:/Users/imapa/flutter/packages/flutter/lib/src/painting/border_radius.dart').

     - 'BorderRadiusGeometry' is from 'package:flutter/src/painting/border_radius.dart' ('/C:/Users/imapa/flutter/packages/flutter/lib/src/painting/border_radius.dart').

            borderRadius: borderRadius,

                          ^

    Target kernel_snapshot failed: Exception

     

     

    FAILURE: Build failed with an exception.

     

    * Where:

    Script 'C:\Users\imapa\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1350

     

    * What went wrong:

    Execution failed for task ':app:compileFlutterBuildDebug'.

    > Process 'command 'C:\Users\imapa\flutter\bin\flutter.bat'' 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 12s

    Exception: Gradle task assembleDebug failed with exit code 1

  7. Generic placeholder image

    Angela replied

    You can ignore it. It doesn't affect the code. and have you changed the library or any version?

    Thanks & Regards
    - Angela
  8. Generic placeholder image

    Abdullah Patel replied

    How can i update the one signal library?

  9. Generic placeholder image

    Abdullah Patel replied

    other error show in AndroidManifest.xml

    ATTACHED FILES

  10. Generic placeholder image

    Angela replied

    Hello Abdullah Patel,

    Have you updated the one signal library?

    Thanks & Regards
    - Angela
Recent Tickets
Backend not working after... 1 month ago on March 27, 2025 7:15 AM river is not receiving ri... 3 months ago on January 29, 2025 9:03 AM The app Issue 5 days ago on April 30, 2025 6:44 PM Unable to setup back end ... 1 month ago on March 27, 2025 3:48 AM Friend Request and Distan... 1 month ago on March 18, 2025 4:11 AM Build Faild 1 month ago on March 9, 2025 2:15 PM Error during build... 2 months ago on March 4, 2025 8:51 PM help 2 months ago on March 3, 2025 1:13 AM Connection Refused Error... 2 months ago on February 27, 2025 4:47 AM Flutter app issues... 2 months ago on February 26, 2025 10:49 AM