Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Crash when opening Plaid in the Flutter app after building APK #293

Open
muddasirAlgo opened this issue Dec 10, 2024 · 0 comments
Open

Comments

@muddasirAlgo
Copy link

muddasirAlgo commented Dec 10, 2024

I am facing an issue with the Plaid i am using flutter_package (version 4.1.1) in my Flutter app. This works fine during development when running the app on an emulator or during debugging. However, when I build the APK using
flutter build apk --release
and try to open the Plaid functionality in the app, then app crashes immediately.

app/build.gradle:

plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}

android {
namespace = "com.example.app"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

compileOptions {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
    jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId = "com.example.app"
    // You can update the following values to match your application needs.
    // For more information, see: https://flutter.dev/to/review-gradle-config.
    minSdk = 21
    targetSdk = flutter.targetSdkVersion
    versionCode = flutter.versionCode
    versionName = flutter.versionName
}

buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig = signingConfigs.debug
    }
}

}

flutter {
source = "../.."
}

dependencies {
// ...
implementation "com.plaid.link:sdk-core:4.6.1"
}

Logs:
E/AndroidRuntime(17287): FATAL EXCEPTION: DefaultDispatcher-worker-3
E/AndroidRuntime(17287): Process: com.example.app, PID: 17287
E/AndroidRuntime(17287): java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
E/AndroidRuntime(17287): at retrofit2.n.f(SourceFile:21)
E/AndroidRuntime(17287): at retrofit2.H.b(SourceFile:20)
E/AndroidRuntime(17287): at retrofit2.G.c(SourceFile:25)
E/AndroidRuntime(17287): at retrofit2.G$a.invoke(SourceFile:38)
E/AndroidRuntime(17287): at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
E/AndroidRuntime(17287): at $Proxy5.a(Unknown Source)
E/AndroidRuntime(17287): at com.plaid.internal.s9$a.invokeSuspend(SourceFile:66)
E/AndroidRuntime(17287): at kotlin.coroutines.jvm.internal.a.resumeWith(SourceFile:12)
E/AndroidRuntime(17287): at R2.V.run(SourceFile:129)
E/AndroidRuntime(17287): at W2.m$a.run(SourceFile:4)
E/AndroidRuntime(17287): at Y2.k.run(SourceFile:3)
E/AndroidRuntime(17287): at Y2.a.M(SourceFile:1)
E/AndroidRuntime(17287): at Y2.a$c.d(SourceFile:15)
E/AndroidRuntime(17287): at Y2.a$c.p(SourceFile:29)
E/AndroidRuntime(17287): at Y2.a$c.run(SourceFile:1)
E/AndroidRuntime(17287): Suppressed: W2.i: [K0{Cancelling}@2b975e0, Dispatchers.Default]

Any help or advice would be greatly appreciated.

Thanks!

@muddasirAlgo muddasirAlgo changed the title Crash when opening Plaid in the Flutter app after building APK App Crash when opening Plaid in the Flutter app after building APK Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant