Home > Net >  I am getting a failed build while running my project
I am getting a failed build while running my project

Time:05-19

I just upgraded my Android Studio and flutter SDK. When I try running my flutter project I keep getting this error below. I am using flutter_paystack: ^1.0.5 1 package.

Parameter format not correct -
e: C:\src\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_paystack-1.0.5 1\android\src\main\kotlin\co\paystack\flutterpaystack\FlutterPaystackPlugin.kt: (48, 62): Type mismatch: inferred type is Activity? but Activity was expected
e: C:\src\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_paystack-1.0.5 1\android\src\main\kotlin\co\paystack\flutterpaystack\MethodCallHandlerImpl.kt: (19, 37): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_paystack:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
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.

Please what might be the cause

CodePudding user response:

package flutter_paystack: 1.0.5 1 not work on flutter 3

try change dependency of flutter_paystack 1.0.5 1 in pubspec.yaml to:

flutter_paystack:
    git:
      url: https://github.com/definitelyme/flutter_paystack.git
      ref: a4a33c3dd0a12f46d655a2e63d11e9f20ba82d01

CodePudding user response:

Go to your android/build.gradle file and update your Kotlin version hope its help to you.

ext.kotlin_version = '1.6.10'
  • Related