[英]I am getting a failed build while running my project
I just upgraded my Android Studio and flutter SDK.我刚刚升级了我的 Android Studio 和 flutter SDK。 When I try running my flutter project I keep getting this error below.当我尝试运行我的 flutter 项目时,我一直在下面收到此错误。 I am using flutter_paystack: ^1.0.5+1
package.我正在使用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请问可能是什么原因
package flutter_paystack: 1.0.5+1
not work on flutter 3包flutter_paystack: 1.0.5+1
不适用于flutter 3
try change dependency of flutter_paystack 1.0.5+1
in pubspec.yaml
to:尝试将 pubspec.yaml 中pubspec.yaml
flutter_paystack 1.0.5+1
的依赖项更改为:
flutter_paystack:
git:
url: https://github.com/definitelyme/flutter_paystack.git
ref: a4a33c3dd0a12f46d655a2e63d11e9f20ba82d01
转到您的android/build.gradle
文件并更新您的Kotlin版本,希望对您有所帮助。
ext.kotlin_version = '1.6.10'
This is mostly a problem with the Flutter version 3.这主要是 Flutter 版本 3 的问题。
The best bet you have is to downgrade your flutter to version 2.xx最好的选择是将 flutter 降级到 2.xx 版本
This might conflict with other plugins you're using(like I experienced).这可能与您正在使用的其他插件冲突(就像我经历过的那样)。
So you might as an alternative.所以你可以作为替代方案。 Try embedding paystack payment in a webview.尝试在 webview 中嵌入 paystack 支付。 Create a web page, integrate paystack.创建一个web页面,集成paystack。 Call that web page in a webview embedded in the app.在应用程序中嵌入的 webview 中调用 web 页面。
It might even be better if you're looking for extra payment options like bank transfer which isn't available on the flutter app plugin.如果您正在寻找 flutter 应用程序插件上不可用的额外付款选项(例如银行转帐),那可能会更好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.