#hungleviet_error
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1351151826631921745
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
detail of build.gradle
buildscript {
ext {
buildToolsVersion = "30.0.2"
kotlinVersion = "1.6.21"
minSdkVersion = 30
compileSdkVersion = 34
targetSdkVersion = 34
supportLibVersion = "30.0.0"
multiDexEnabled = true
androidXCore = "1.6.0"
ndkVersion = '21.4.7075529'
}
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
// Add the following line:
classpath 'com.google.gms:google-services:4.3.10' // Google Services plugin
classpath 'com.android.tools.build:gradle:7.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
allprojects {
configurations.all {
resolutionStrategy {
// Remove this override in 0.65+, as a proper fix is included in react-native itself.
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}
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")
}
maven { url 'https://maven.google.com' }
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
Please help me to manually link this libraly correctly so pipeline will run without err
๐
You are want to use React Native right ?
Why you want to update the Android Gradle of your project ?
You simply need to do:
yarn add @stripe/stripe-react-native
or
npm install @stripe/stripe-react-native
I want to get android build link from CI/CD
What link exactly you want to get ?
I already did it
My project is a bt complex to explain but I need to links the library to native and push changes so CI/CI will generate a debug build link from that
After yarn add @stripe/stripe-react-native
I wrapped the app with stripe provider it gets err TypeError: null is not an object (evaluating '_NativeStripeSdk.default.getConstants')
Then I guess it was not linked to native yet
So I tried npx react-native link @stripe/stripe-react-native
notthing happend
And I manually links with changes like above and push to trigger CI/CD so the pipeline run but it get me another err like I did something wrong
I need to get more details about what you want to achieve first...
What does your CI/CD expects ?
What gradel command are you running ?
Can you try to reproduce on this sample ?
https://github.com/stripe/stripe-react-native/tree/master/example
No, I ran the example project with no issue
There must be something changed in your project then
Did you tried to use the example with all the dependencies youa re using currentyl ?
It hard to do so when example project is using standard tech (recent versions, functional component,..) and each project has different configuration
I just make sure that I manual linking correctly for react-native-stripe
You are doing well yeah using the link command
What I encourage you to do, is to use the sample as a base working project and start adding the dependencies
one by one
untill you reproduce your CI failure
Nah I just couldn't do it the project has a lot of level restrict from my access
e: /builds/clientprojects/assembler_projects/prd/mybuilderproject-632525-react-native/src/node_modules/@stripe/stripe-react-native/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt: (1040, 33): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.1.0, expected version is 1.6.0.
but found v8.4.7, this might cause build issues or runtime crashes.
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':@stripe_stripe-react-native:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details
- Try:
The class is loaded from /root/.gradle/caches/transforms-3/293cda21339f850714a00dc45f3494c9/transformed/jetified-kotlin-stdlib-2.1.10.jar!/kotlin/Unit.class
e: /builds/clientprojects/assembler_projects/prd/mybuilderproject-632525-react-native/src/node_modules/@stripe/stripe-react-native/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt: (1041, 27): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.1.0, expected version is 1.6.0.
The class is loaded from /root/.gradle/caches/transforms-3/293cda21339f850714a00dc45f3494c9/transformed/jetified-kotlin-stdlib-2.1.10.jar!/kotlin/Unit.class
e: /builds/clientprojects/assembler_projects/prd/mybuilderproject-632525-react-native/src/node_modules/@stripe/stripe-react-native/android/src/main/java/com/reactnativestripesdk/utils/PostalCodeUtilities.kt: (5, 105): Unresolved reference: isWhitespace
e: /builds/clientprojects/assembler_projects/prd/mybuilderproject-632525-react-native/src/node_modules/@stripe/stripe-react-native/android/src/main/java/com/reactnativestripesdk/utils/PostalCodeUtilities.kt: (7, 93): Unresolved reference: isWhitespace
Task :@stripe_stripe-react-native:compileDebugKotlin FAILED
Task :app:mergeDebugResources
Execution optimizations have been disabled for task ':app:mergeDebugResources' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/builds/clientprojects/assembler_projects/prd/mybuilderproject-632525-react-native/src/node_modules/@stripe/stripe-react-native/android/build/intermediates/packaged_res/debug'. Reason: Task ':app:mergeDebugResources' uses this output of task ':@stripe_stripe-react-native:packageDebugResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
ReactNativeFirebase WARNING: NPM package '@react-native-firebase/analytics' depends on '@react-native-firebase/app' v13.1.1
here the failed message from the job
ReactNativeFirebase WARNING: NPM package '@react-native-firebase/analytics' depends on '@react-native-firebase/app' v13.1.1
here the failed message from the job
Try upgrade the firebase dependency ?
I assume it was my fault when manually linking but the dependencies was not compatible
Sorry, as you project have a lot of local dependencies, it's hard to tell
What I can garantee is that Stripe RN package is good
And you couldn't reproduce the issue on our official sample
there must be a conflict or something similar that causes the issue you have
so the straighforward path is to start to isolate and try to point the root cause
Sad news but Ok ๐ฆ
but I have a question will "@stripe/stripe-react-native": "^0.43.0" work with "react-native": "0.65.3 ?