MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
269 stars 238 forks source link

build failure android #432

Open serraojoao opened 1 year ago

serraojoao commented 1 year ago

Hi all,

build is failing with below error for android flutter version 3.10.2

FAILURE: Build failed with an exception.

MaikuB commented 1 year ago

This should be something to do with your build settings than the plugin even though the plugin is mentioned. Perhaps you're using other plugins that require certain settings to be specified in build.gradle. If you believe there's an issue with the plugin itself then please provide a link to a repo hosting an minimal app with code that can reproduce this

Peterkrol12 commented 1 year ago

I had a similar issue, what fixed it for me was updating the com.android.tools.build:gradle:4.1.0 dependency in android/build.gradle to version 7.1.2, like the following:

classpath 'com.android.tools.build:gradle:7.1.2'

The reason I chose 7.1.2 was that a 'newer' Flutter project of mine had this version after generation :)

juandelgado commented 8 months ago

@Peterkrol12 did you have to do anything other than updating the version to 7.1.2?

I've tried cleaning the project and even the suggested Android X migration in the documentation, but the problem persists.

EDIT: I got it to work by using Android Gradle Plugin to 7.4.2 in android/build.gradle and Gradle to 7.5 in android/gradle/wrapper/gradle-wrapper.properties. But that forced me to disable ProGuard in android/app/build.gradle.