wilburx9 / flutter_paystack

:credit_card: A robust Flutter plugin for making payments via Paystack Payment Gateway. Completely supports Android and iOS
https://pub.dartlang.org/packages/flutter_paystack
Apache License 2.0
209 stars 360 forks source link

Failed android build #2

Closed mtellect closed 5 years ago

mtellect commented 5 years ago

I must say , the library is brilliant. works well on ios out of the box without any complex form of configuration, but on android fails to build completely with these completely annoying error

e: /Users/iammaugost/.pub-cache/hosted/pub.dartlang.org/flutter_paystack-0.9.1+1/android/src/main/kotlin/co/paystack/flutterpaystack/FlutterPaystackPlugin.kt: (44, 44): Type mismatch: inferred type is String? but String was expected

FAILURE: Build failed with an exception.

BUILD FAILED in 1m 10s

..please help look into it

mtellect commented 5 years ago

Solved!!!... Locate the FlutterPaystack.kt file located on the android side of the plugin and Replace @line44 val encryptedData = Crypto.encrypt(call.argument("stringData")) with : val encryptedData = Crypto.encrypt(call.argument("stringData").toString())

boom!! your good to go... for the record the library is superb!!!

wilburx9 commented 5 years ago

Thanks for this. Strangely, I am not getting such an error.

Please, can you make a pull request with this fix?

Emmakade commented 1 year ago

Solved!!!... Locate the FlutterPaystack.kt file located on the android side of the plugin and Replace @line44 val encryptedData = Crypto.encrypt(call.argument("stringData")) with : val encryptedData = Crypto.encrypt(call.argument("stringData").toString())

boom!! your good to go... for the record the library is superb!!!

Weldone, my own version is version 1.0.6 and all the code lines including bracing bracket is 42