darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
193 stars 127 forks source link

build error using flutter_facebook_auth #301

Closed suhail600 closed 1 year ago

suhail600 commented 1 year ago

What version are you using?

flutter_facebook_auth: ^5.0.0+2

What OS and version are you using to local deploy your application?

windows 11

What platforms are you seeing the problem on?

Android

pubspec.yaml

name: finefair
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.17.5 <3.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  http: ^0.13.4
  provider: ^6.0.3
  hive: ^2.2.3
  hive_flutter: ^1.1.0
  share_plus: ^4.0.10
  store_redirect: ^2.0.1
  url_launcher: ^6.1.5
  shared_preferences: ^2.0.15
  flutter_phone_direct_caller: ^2.1.1
  connectivity_plus: ^2.3.6
  internet_connection_checker: ^0.0.1+4
  intl: ^0.17.0

  firebase_core: ^1.24.0
  firebase_auth: ^3.7.0
  google_sign_in: ^5.4.1
  sign_in_with_apple: ^4.1.0
  flutter_facebook_auth: ^5.0.0+2
  firebase_messaging: ^13.0.0
  flutter_local_notifications: ^9.9.1

  badges: ^2.0.3
  shimmer: ^2.0.0
  google_fonts: ^3.0.1
  fluttertoast: ^8.0.9
  circle_nav_bar: ^1.0.2
  dotted_border: ^2.0.0+2
  delayed_display: ^2.0.0
  carousel_slider: ^4.1.1
  swipeable_tile: ^2.0.0+1 #dissmissable
  intl_phone_field: ^3.0.0
  cached_network_image: ^3.2.1
  top_snackbar_flutter: ^1.1.1
  date_picker_timeline: ^1.2.3
  easy_localization: ^3.0.1
  readmore: ^2.2.0
  flutter_widget_from_html: ^0.8.5

dev_dependencies:
  flutter_test:
    sdk: flutter

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^2.0.0
  hive_generator: ^1.1.3
  build_runner: ^2.1.11
  flutter_native_splash: ^2.2.4
  flutter_launcher_icons: ^0.10.0

flutter_native_splash:
  ##color: "#FFFFFF"
  background_image: assets/images/splash-background.png
  image: assets/images/logo-splash.png

flutter_icons:
  android: true
  ios: true
  image_path: "assets/images/appicon.png"

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
     - assets/images/
     - assets/translations/
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: Ktm
      fonts:
        - asset: assets/fonts/Ktm.ttf
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

Describe the Bug

I was using flutter facebook auth till saturday 29/10/2022 app was running good with facebook login, on monday 31/10/2022 app is not getting build , its exits with facebook sdk error as shown below

FAILURE: Build failed with an exception.

BUILD FAILED in 2m 25s Exception: Gradle task assembleDebug failed with exit code 1

Expected Behavior

need to compile and run the app , but its not running showing facebook sdk eror like i attached the eror

To Reproduce

check any project with facebook sdk

Relevant log output

No response

flutter doctor -v

[√] Flutter (Channel stable, 3.3.6, on Microsoft Windows [Version 10.0.22621.755], locale en-IN)
    • Flutter version 3.3.6 on channel stable at C:\Users\user112\development\sdks\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6928314d50 (5 days ago), 2022-10-25 16:34:41 -0400
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\user112\AppData\Local\Android\sdk
    • Platform android-33, build-tools 31.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.72.2)
    • VS Code at C:\Users\user112\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.50.0

[√] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.22621.755]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 107.0.5304.87
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 107.0.1418.26

[√] HTTP Host Availability
    • All required HTTP hosts are available

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

DevMansoor commented 1 year ago

I was also facing this error today so what I do in app\build.gradle just comment the sdk and put this facebook-login line and then it run. I don't know whether it is corrector not untill the owner guide about it.

//        implementation 'com.facebook.android:facebook-android-sdk:latest.release'
        implementation "com.facebook.android:facebook-login:15.0.2"
harmeet-sidhu commented 1 year ago

I was also facing this error today so what I do in app\build.gradle just comment the sdk and put this facebook-login line and then it run. I don't know whether it is corrector not untill the owner guide about it.

//        implementation 'com.facebook.android:facebook-android-sdk:latest.release'
        implementation "com.facebook.android:facebook-login:15.0.2"

Yes, I can confirm that instead of latest.release adding the latest SDK version(i.e. 15.0.2), fixes the build error.

suhail600 commented 1 year ago

I was also facing this error today so what I do in app\build.gradle just comment the sdk and put this facebook-login line and then it run. I don't know whether it is corrector not untill the owner guide about it.

//        implementation 'com.facebook.android:facebook-android-sdk:latest.release'
        implementation "com.facebook.android:facebook-login:15.0.2"

@DevMansoor and @harmeet-sidhu thanks bros , that works. @darwin-morocho please guide us about this issue with a proper solution as we all rely on your awesome work

darwin-morocho commented 1 year ago

I was also facing this error today so what I do in app\build.gradle just comment the sdk and put this facebook-login line and then it run. I don't know whether it is corrector not untill the owner guide about it.

//        implementation 'com.facebook.android:facebook-android-sdk:latest.release'
        implementation "com.facebook.android:facebook-login:15.0.2"

@DevMansoor and @harmeet-sidhu thanks bros , that works. @darwin-morocho please guide us about this issue with a proper solution as we all rely on your awesome work

Hi in your build.gradle you should not add implementation "com.facebook.android:facebook-login:15.0.2" because this plugin already define that dependency for you.

DevMansoor commented 1 year ago

I was also facing this error today so what I do in app\build.gradle just comment the sdk and put this facebook-login line and then it run. I don't know whether it is corrector not untill the owner guide about it.

//        implementation 'com.facebook.android:facebook-android-sdk:latest.release'
        implementation "com.facebook.android:facebook-login:15.0.2"

@DevMansoor and @harmeet-sidhu thanks bros , that works. @darwin-morocho please guide us about this issue with a proper solution as we all rely on your awesome work

Hi in your build.gradle you should not add implementation "com.facebook.android:facebook-login:15.0.2" because this plugin already define that dependency for you.

So should we write implementation 'com.facebook.android:facebook-android-sdk:latest.release' rather than implementation "com.facebook.android:facebook-login:15.0.2" ? Please elaborate it.

harmeet-sidhu commented 1 year ago

I was also facing this error today so what I do in app\build.gradle just comment the sdk and put this facebook-login line and then it run. I don't know whether it is corrector not untill the owner guide about it.

//        implementation 'com.facebook.android:facebook-android-sdk:latest.release'
        implementation "com.facebook.android:facebook-login:15.0.2"

@DevMansoor and @harmeet-sidhu thanks bros , that works. @darwin-morocho please guide us about this issue with a proper solution as we all rely on your awesome work

Hi in your build.gradle you should not add implementation "com.facebook.android:facebook-login:15.0.2" because this plugin already define that dependency for you.

So should we write implementation 'com.facebook.android:facebook-android-sdk:latest.release' rather than implementation "com.facebook.android:facebook-login:15.0.2" ? Please elaborate it.

You don't need to add the Facebook Login dependency in your build.gradle file, if you are using flutter_facebook_auth, it is already been added to it.

DevMansoor commented 1 year ago

I was also facing this error today so what I do in app\build.gradle just comment the sdk and put this facebook-login line and then it run. I don't know whether it is corrector not untill the owner guide about it.

//        implementation 'com.facebook.android:facebook-android-sdk:latest.release'
        implementation "com.facebook.android:facebook-login:15.0.2"

@DevMansoor and @harmeet-sidhu thanks bros , that works. @darwin-morocho please guide us about this issue with a proper solution as we all rely on your awesome work

Hi in your build.gradle you should not add implementation "com.facebook.android:facebook-login:15.0.2" because this plugin already define that dependency for you.

So should we write implementation 'com.facebook.android:facebook-android-sdk:latest.release' rather than implementation "com.facebook.android:facebook-login:15.0.2" ? Please elaborate it.

You don't need to add the Facebook Login dependency in your build.gradle file, if you are using flutter_facebook_auth, it is already been added to it.

So when we'll remove this it throw the error, so how can we solve the error?

darwin-morocho commented 1 year ago

I was also facing this error today so what I do in app\build.gradle just comment the sdk and put this facebook-login line and then it run. I don't know whether it is corrector not untill the owner guide about it.

//        implementation 'com.facebook.android:facebook-android-sdk:latest.release'
        implementation "com.facebook.android:facebook-login:15.0.2"

@DevMansoor and @harmeet-sidhu thanks bros , that works. @darwin-morocho please guide us about this issue with a proper solution as we all rely on your awesome work

Hi in your build.gradle you should not add implementation "com.facebook.android:facebook-login:15.0.2" because this plugin already define that dependency for you.

So should we write implementation 'com.facebook.android:facebook-android-sdk:latest.release' rather than implementation "com.facebook.android:facebook-login:15.0.2" ? Please elaborate it.

You don't need to add the Facebook Login dependency in your build.gradle file, if you are using flutter_facebook_auth, it is already been added to it.

So when we'll remove this it throw the error, so how can we solve the error?

Add your build.gradle

A7mdFathi commented 1 year ago

What version are you using?

flutter_facebook_auth: ^5.0.0+2

What OS and version are you using to local deploy your application?

windows 11

What platforms are you seeing the problem on?

Android

pubspec.yaml

name: finefair
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.17.5 <3.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  http: ^0.13.4
  provider: ^6.0.3
  hive: ^2.2.3
  hive_flutter: ^1.1.0
  share_plus: ^4.0.10
  store_redirect: ^2.0.1
  url_launcher: ^6.1.5
  shared_preferences: ^2.0.15
  flutter_phone_direct_caller: ^2.1.1
  connectivity_plus: ^2.3.6
  internet_connection_checker: ^0.0.1+4
  intl: ^0.17.0

  firebase_core: ^1.24.0
  firebase_auth: ^3.7.0
  google_sign_in: ^5.4.1
  sign_in_with_apple: ^4.1.0
  flutter_facebook_auth: ^5.0.0+2
  firebase_messaging: ^13.0.0
  flutter_local_notifications: ^9.9.1

  badges: ^2.0.3
  shimmer: ^2.0.0
  google_fonts: ^3.0.1
  fluttertoast: ^8.0.9
  circle_nav_bar: ^1.0.2
  dotted_border: ^2.0.0+2
  delayed_display: ^2.0.0
  carousel_slider: ^4.1.1
  swipeable_tile: ^2.0.0+1 #dissmissable
  intl_phone_field: ^3.0.0
  cached_network_image: ^3.2.1
  top_snackbar_flutter: ^1.1.1
  date_picker_timeline: ^1.2.3
  easy_localization: ^3.0.1
  readmore: ^2.2.0
  flutter_widget_from_html: ^0.8.5

dev_dependencies:
  flutter_test:
    sdk: flutter

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^2.0.0
  hive_generator: ^1.1.3
  build_runner: ^2.1.11
  flutter_native_splash: ^2.2.4
  flutter_launcher_icons: ^0.10.0

flutter_native_splash:
  ##color: "#FFFFFF"
  background_image: assets/images/splash-background.png
  image: assets/images/logo-splash.png

flutter_icons:
  android: true
  ios: true
  image_path: "assets/images/appicon.png"

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
     - assets/images/
     - assets/translations/
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: Ktm
      fonts:
        - asset: assets/fonts/Ktm.ttf
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

Describe the Bug

I was using flutter facebook auth till saturday 29/10/2022 app was running good with facebook login, on monday 31/10/2022 app is not getting build , its exits with facebook sdk error as shown below

FAILURE: Build failed with an exception.

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.

BUILD FAILED in 2m 25s Exception: Gradle task assembleDebug failed with exit code 1

Expected Behavior

need to compile and run the app , but its not running showing facebook sdk eror like i attached the eror

To Reproduce

check any project with facebook sdk

Relevant log output

No response

flutter doctor -v

[√] Flutter (Channel stable, 3.3.6, on Microsoft Windows [Version 10.0.22621.755], locale en-IN)
    • Flutter version 3.3.6 on channel stable at C:\Users\user112\development\sdks\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6928314d50 (5 days ago), 2022-10-25 16:34:41 -0400
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\user112\AppData\Local\Android\sdk
    • Platform android-33, build-tools 31.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.72.2)
    • VS Code at C:\Users\user112\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.50.0

[√] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.22621.755]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 107.0.5304.87
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 107.0.1418.26

[√] HTTP Host Availability
    • All required HTTP hosts are available

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

i have the same issue anyone solve it?

darwin-morocho commented 1 year ago

What version are you using?

flutter_facebook_auth: ^5.0.0+2

What OS and version are you using to local deploy your application?

windows 11

What platforms are you seeing the problem on?

Android

pubspec.yaml

name: finefair
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.17.5 <3.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  http: ^0.13.4
  provider: ^6.0.3
  hive: ^2.2.3
  hive_flutter: ^1.1.0
  share_plus: ^4.0.10
  store_redirect: ^2.0.1
  url_launcher: ^6.1.5
  shared_preferences: ^2.0.15
  flutter_phone_direct_caller: ^2.1.1
  connectivity_plus: ^2.3.6
  internet_connection_checker: ^0.0.1+4
  intl: ^0.17.0

  firebase_core: ^1.24.0
  firebase_auth: ^3.7.0
  google_sign_in: ^5.4.1
  sign_in_with_apple: ^4.1.0
  flutter_facebook_auth: ^5.0.0+2
  firebase_messaging: ^13.0.0
  flutter_local_notifications: ^9.9.1

  badges: ^2.0.3
  shimmer: ^2.0.0
  google_fonts: ^3.0.1
  fluttertoast: ^8.0.9
  circle_nav_bar: ^1.0.2
  dotted_border: ^2.0.0+2
  delayed_display: ^2.0.0
  carousel_slider: ^4.1.1
  swipeable_tile: ^2.0.0+1 #dissmissable
  intl_phone_field: ^3.0.0
  cached_network_image: ^3.2.1
  top_snackbar_flutter: ^1.1.1
  date_picker_timeline: ^1.2.3
  easy_localization: ^3.0.1
  readmore: ^2.2.0
  flutter_widget_from_html: ^0.8.5

dev_dependencies:
  flutter_test:
    sdk: flutter

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^2.0.0
  hive_generator: ^1.1.3
  build_runner: ^2.1.11
  flutter_native_splash: ^2.2.4
  flutter_launcher_icons: ^0.10.0

flutter_native_splash:
  ##color: "#FFFFFF"
  background_image: assets/images/splash-background.png
  image: assets/images/logo-splash.png

flutter_icons:
  android: true
  ios: true
  image_path: "assets/images/appicon.png"

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
     - assets/images/
     - assets/translations/
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: Ktm
      fonts:
        - asset: assets/fonts/Ktm.ttf
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

Describe the Bug

I was using flutter facebook auth till saturday 29/10/2022 app was running good with facebook login, on monday 31/10/2022 app is not getting build , its exits with facebook sdk error as shown below FAILURE: Build failed with an exception.

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.

BUILD FAILED in 2m 25s Exception: Gradle task assembleDebug failed with exit code 1

Expected Behavior

need to compile and run the app , but its not running showing facebook sdk eror like i attached the eror

To Reproduce

check any project with facebook sdk

Relevant log output

No response

flutter doctor -v

[√] Flutter (Channel stable, 3.3.6, on Microsoft Windows [Version 10.0.22621.755], locale en-IN)
    • Flutter version 3.3.6 on channel stable at C:\Users\user112\development\sdks\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6928314d50 (5 days ago), 2022-10-25 16:34:41 -0400
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\user112\AppData\Local\Android\sdk
    • Platform android-33, build-tools 31.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.72.2)
    • VS Code at C:\Users\user112\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.50.0

[√] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.22621.755]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 107.0.5304.87
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 107.0.1418.26

[√] HTTP Host Availability
    • All required HTTP hosts are available

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

i have the same issue anyone solve it?

Please add yours build.gradle files

darwin-morocho commented 1 year ago

@suhail600 @A7mdFathi @harmeet-sidhu check in your android/build.gradle file you don't have the jcenter() repository (that is deprecated). you should replace jcenter() with mavenCentral(). like this

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

next try with flutter_facebook_auth: ^5.0.1

Gimposai commented 1 year ago

I did what darwin-morocho said and it built with no errors. What error are you guys getting when you comment it out?

dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21" implementation 'com.android.support:multidex:1.0.3' //implementation 'com.facebook.android:facebook-login:latest.release' }

A7mdFathi commented 1 year ago

@darwin-morocho I download the example in package and had same issue

darwin-morocho commented 1 year ago
  • Could not resolve com.facebook.android:facebook-android-sdk:latest.release.

Have you tried this example https://github.com/darwin-morocho/flutter-facebook-auth/tree/master/examples/with_provider?

darwin-morocho commented 1 year ago
  • Could not resolve com.facebook.android:facebook-android-sdk:latest.release.

Have you tried this example https://github.com/darwin-morocho/flutter-facebook-auth/tree/master/examples/with_provider?

I have tried to reproduce the issue in a new flutter project and nothing happens. Android build was successful.

Please, Could you add your android/build.gradle and your android/app/build.gradle?

A7mdFathi commented 1 year ago

@darwin-morocho here it is android/app/build.gradle

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 33

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    // lintOptions {
    //     disable 'InvalidPackage'
    //     // checkReleaseBuilds false
    // }
     lintOptions {
    checkReleaseBuilds false
  }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.test.app"
        minSdkVersion 23
        targetSdkVersion 33
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true

    }

    signingConfigs {
       release {
           keyAlias keystoreProperties['keyAlias']
           keyPassword keystoreProperties['keyPassword']
           storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
           storePassword keystoreProperties['storePassword']
       }
   }
   buildTypes {
       release {
           signingConfig signingConfigs.release
       }
   }

}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation platform('com.google.firebase:firebase-bom:27.1.0')

}
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.gms.google-services'

and android/build.gradle

buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.2.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.14'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
A7mdFathi commented 1 year ago

@darwin-morocho @Gimposai @suhail600 @harmeet-sidhu after i run expample in package (with_provider) I change ext.kotlin_version = '1.6.10' and classpath 'com.android.tools.build:gradle:7.1.2' as the same in example and it work for me. and make sure that you don't import implementation 'com.facebook.android:facebook-login:latest.release' in build.gradle

suhail600 commented 1 year ago

com.android.tools.build:gradle

@DevMansoor @harmeet-sidhu @darwin-morocho its now working with flutter_facebook_auth: ^5.0.1 and flutter_facebook_auth: ^4.4.1+1 without the use of both item,

//implementation 'com.facebook.android:facebook-android-sdk:latest.release' //implementation "com.facebook.android:facebook-login:15.0.2"

yesterday app was getting build if we remove

//implementation 'com.facebook.android:facebook-android-sdk:latest.release'

and facebook login throwed,-- "no implementation found error"

today I checked both the versions and build and facebook login is working fine ,I don't know how it solved ,can u please check and confirm so we can close this issue @DevMansoor @harmeet-sidhu

DevMansoor commented 1 year ago

com.android.tools.build:gradle

@DevMansoor @harmeet-sidhu @darwin-morocho its now working with flutter_facebook_auth: ^5.0.1 and flutter_facebook_auth: ^4.4.1+1 without the use of both item,

//implementation 'com.facebook.android:facebook-android-sdk:latest.release' //implementation "com.facebook.android:facebook-login:15.0.2"

yesterday app was getting build if we remove

//implementation 'com.facebook.android:facebook-android-sdk:latest.release'

and facebook login throwed,-- "no implementation found error"

today I checked both the versions and build and facebook login is working fine ,I don't know how it solved ,can u please check and confirm so we can close this issue @DevMansoor @harmeet-sidhu

Yes now it is working after the update.