0maru / twitter_login

MIT License
54 stars 54 forks source link

FAILURE: Build failed with an exception. #136

Open eandavis9 opened 4 months ago

eandavis9 commented 4 months ago

FAILURE: Build failed with an exception.

Flutter version 3.22.2 Gradle Version 8.x

chronicc commented 2 weeks ago

This is probably related to the use of an older Gradle version in this project. To workaround the problem whether downgrade your gradle version to 7.x or temporarily manipulate the flutter package in your cache directory (not recommended since it will be overridden when using flutter pub get).

To manipulate the package update the ~/.pub-cache/hosted/pub.dev/twitter_login-4.4.2/android/build.gradle file and add the namespace argument into the android section`.

...

rootProject.allprojects {
    repositories {
        google()
        mavenLocal()
    }
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
    namespace = "com.maru.twitter_login" // <-- Add this line

    compileSdkVersion 31

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

...
chronicc commented 2 weeks ago

I just saw that there is already a fix on the main branch which is not yet released. A better workaround until the release would be to use the git commit as dependency.

# pubspec.yaml

dependencies:
  twitter_login:
    git:
      url: https://github.com/0maru/twitter_login.git
      ref: 9ecd17c9af7675b00925fcdcd578e1294844f861