'Execution failed for task ':stripe_android:compileDebugKotlin'

I am facing this issue while integrating stripe payment in my app. I am using kotlin version 1.6.10 and also having minimum SDK version 21.

Error is showing that:

e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\stripe_android-2.5.0\android\src\main\kotlin\com\flutter\stripe\StripeAubecsDebitPlatformViewFactory.kt: (13, 1): Class 'StripeAubecsDebitPlatformViewFactory' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\stripe_android-2.5.0\android\src\main\kotlin\com\flutter\stripe\StripeAubecsDebitPlatformViewFactory.kt: (19, 5): 'create' overrides nothing e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\stripe_android-2.5.0\android\src\main\kotlin\com\flutter\stripe\StripeSdkCardFormPlatformViewFactory.kt: (12, 1): Class 'StripeSdkCardFormPlatformViewFactory' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\stripe_android-2.5.0\android\src\main\kotlin\com\flutter\stripe\StripeSdkCardFormPlatformViewFactory.kt: (18, 5): 'create' overrides nothing e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\stripe_android-2.5.0\android\src\main\kotlin\com\flutter\stripe\StripeSdkCardPlatformViewFactory.kt: (12, 1): Class 'StripeSdkCardPlatformViewFactory' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\stripe_android-2.5.0\android\src\main\kotlin\com\flutter\stripe\StripeSdkCardPlatformViewFactory.kt: (18, 5): 'create' overrides nothing e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\stripe_android-2.5.0\android\src\main\kotlin\com\flutter\stripe\StripeSdkGooglePayButtonPlatformViewFactory.kt: (12, 1): Class 'StripeSdkGooglePayButtonPlatformViewFactory' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\stripe_android-2.5.0\android\src\main\kotlin\com\flutter\stripe\StripeSdkGooglePayButtonPlatformViewFactory.kt: (18, 5): 'create' overrides nothing

This is my build.gradle app-level file.

''' '''



Solution 1:[1]

Try changing MainActivity (inside app/src/main/kotlin) to this:

import io.flutter.embedding.android.FlutterFragmentActivity
class MainActivity(): FlutterFragmentActivity() {

}

Solution 2:[2]

For temporary solution you can fix it with this changes.solution

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tyler2P
Solution 2 Vishal Dhaduk