Instalé react-native stripe sdk con el siguiente comando:
npm install @stripe/stripe-react-nativeDespués de intentar compilar la aplicación, aparecen los dos errores siguientes:
FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * Where: Build file 'C:\xampp\htdocs\SoFood\node_modules\@stripe\stripe-react-native\android\build.gradle' line: 18 * What went wrong: A problem occurred evaluating project ':stripe_stripe-react-native'. > Failed to apply plugin [id 'kotlin-android'] > The current Gradle version 5.4.1 is not compatible with the Kotlin Gradle plugin. Please use Gradle 6.1 or newer, or the previous version of the Kotlin plugin. * 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. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: A problem occurred configuring project ':stripe_stripe-react-native'. > compileSdkVersion is not specified. * 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. ============================================================================== * Get more help at https://help.gradle.org BUILD FAILED in 1m 40s¿Alguna idea de qué podría ser?
Dice que su versión actual de Gradle no es compatible con los requisitos del paquete. Intente actualizar la versión de su Gradle.
Cómo hacerlo: en android/build.gradle tienes que editar esta línea
classpath 'com.android.tools.build:gradle:xyz'Modifique la x, la y y la z con la versión que sugirieron. por ejemplo :
classpath 'com.android.tools.build:gradle:6.1.0'Edítelo con Android Studio y luego haga clic en Sincronizar ahora