Home > Software design >  Flutter Plugin project :sign_in_apple not found. Please update settings.gradle
Flutter Plugin project :sign_in_apple not found. Please update settings.gradle

Time:04-09

Facing this issue when building the flutter project in Android 31.

ERROR:

Plugin project :sign_in_apple not found. Please update settings.gradle.

FAILURE: Build failed with an exception.

* Where:
Script '/Users/myusername/fluttersdk/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 421

* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
   > Cannot invoke method afterEvaluate() on null object

CodePudding user response:

Check out the steps for adding Apple SignIn to android. https://pub.dev/packages/sign_in_with_apple

CodePudding user response:

You can just replace this code into the android>>settings.gradle

include ':app'

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
    pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}

plugins.each { name, path ->
    def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
    include ":$name"
    project(":$name").projectDir = pluginDirectory
}
  • Related