I am trying to install the stripe SDK for the stripe payment gateway. I have the provider for the stripe in my App.js with the publishable key. When I try to run the android its build fails with the following error
Execution failed for task ':app:checkDebugAarMetadata'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
I have tried some solutions available online but nothing seems to work.
Here is my build.gradle file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 30
ndkVersion = "21.4.7075529"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
jcenter() {
content {
includeModule("com.yqritc", "android-scalablevideoview")
}
}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
maven { url 'https://www.jitpack.io' }
}
}
The latest version of stripe-react-native is using compileSdkVersion 31, please check if your Android project is using the same compileSdkVersion, otherwise you might want to update your project's compileSdkVersion or use an older version of stripe-react-native
if you are using compileSdkVersion 29 you can use
"#stripe/stripe-react-native": "^0.1.2"
its work for me
npm i #stripe/stripe-react-native#0.1.2
Add this inside /android/gradle.properties
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
Related
Please help me to solve the following error. I didn't understand where is the problem. Node version is v14.18.1, npm version is 6.14.15, java version "16.0.1" ,
FAILURE: Build failed with an exception.
Where:
Settings file 'C:\Users\Admin\ReactNativeCode\MyFirstApp\android\settings.gradle'
What went wrong:
Could not compile settings file 'C:\Users\Admin\ReactNativeCode\MyFirstApp\android\settings.gradle'.
startup failed:
General error during semantic analysis: Unsupported class file major version 60
java.lang.IllegalArgumentException: Unsupported class file major version 60
this is my bulid.graddle file
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "21.4.7075529"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
maven { url 'https://www.jitpack.io' }
}
}
Looks like many had the same error. You can check this thread
and check the open-jdk version installed in your system.
this is the error that i'm getting whene i'm trying to build .apk with ./gradlew assembleDebug commande in my android directory from react-native project thanks for any suggestions and help
* What went wrong:
A problem occurred evaluating project ':#react-native-community_masked-view'.
> No signature of method: build_9xydcf3yl2vrrdybqldni6i35.android() is applicable for argument types: (build_9xydcf3yl2vrrdybqldni6i35$_run_closure1) values: [build_9xydcf3yl2vrrdybqldni6i35$_run_closure1#161d1d4]
and my build.gradle looks like this :
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = 30
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
i don't know what is went wrong, any help is welcome
Please provide buildToolsVersion value as string instead of the number in ./build.gradle file
buildToolsVersion='28.0.0'
instead of
buildToolsVersion=28
I am trying to implement Tipsi-stripe in my project, yet after attempting to link manually all the dependencies I am getting the following error
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':tipsi-stripe:generateDebugRFile'.
> Could not resolve all files for configuration ':tipsi-stripe:debugCompileClasspath'.
> Could not find com.google.firebase:firebase-core:17.3.4.
Required by:
project :tipsi-stripe
This is my android/app/build.gradle
dependencies {
implementation 'com.google.firebase:firebase-core:17.3.4' //Added by Antek
implementation platform('com.google.firebase:firebase-bom:28.0.0') //Added by Antek
...
}
This is my android/build.gradle
buildscript {
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
// googlePlayServicesVersion = "16.1.0" // default: "+"
firebaseVersion = "17.3.4" // default: "+"
}
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath 'com.google.gms:google-services:4.3.5'// <- Added this line
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google() //Added by Antek
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
maven { url "https://jitpack.io" }
jcenter()
}
}
And the following are my (problem related) dependencies in package.json
"dependencies": {
...
"#react-native-firebase/app": "^11.4.1",
"#react-native-firebase/auth": "^11.4.1",
"#react-native-firebase/firestore": "^11.4.1",
"#react-native-firebase/messaging": "^11.4.1",
"tipsi-stripe": "^9.0.0"
}
How do I solve this error? I tried cleaning the gradlew with gradlew clean, however nothing seems to be working so far :(
You may not have seen the news, but Stripe just release their own React Native SDK stripe-react-native (github) recently, currently in open beta.
I highly recommend you review that package and the associate guides (eg, accept-a-payment) and shift your integration efforts towards that instead.
Recently I´ve created a new React Native App with the default.. basically everything. On the emulator, it works fine, but, when I try to install it on Android Oreo, it shows an "Application not Installed" message.
I´ve already generated a signed APK as I read in other posts regarding the same issue.
Maybe I should downgrade my RN Version..
Here´s my build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 16
compileSdkVersion = 30
targetSdkVersion = 30
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
Thanks in advance!
I´ve had to downgrade my React Native version to 0.63 in order to make it work.
I am facing problem in react-native before install react-native-admob my app was working fine but after installed and linked by this library my app getting crash on loading time.
I installed latest version of react-native-admob (react-native-admob#next)
react native version: 0.57.8
react version: 16.6.3
Testing on Android oreo
android/build.gradle code
// Top-level build file where you can add configuration options
common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionUrl = distributionUrl.replace("bin", "all")
}
Please help me.
If you want anythings for clarification i will provide.
Goto
node-module/react-native-admob/android/build.gradle file
replace the line
compile 'com.google.android.gms:play-services-ads:+'
with the following line
compile 'com.google.android.gms:play-services-ads:16.0.0'