Closed j3lev closed 1 year ago
Hi @j3lev, sorry for the late response, I've been out on vacation the past two weeks.
Thanks so much for your detailed issue! I'll get to this ASAP and update this issue when a fix has been released.
@j3lev Hi I was unable to reproduce the specific error you encountered with a sample app, so I published a beta version with the proposed fix. Before I publish the actual release, can you double check this version works for you without modifying the build.gradle file in the node_modules?
Beta version is 1.1.1-beta.1
@bgiori Hmm I'm still seeing issues. So you weren't able to reproduce this against a React Native 0.71.7 project? I'm seeing the following error when running a ./gradlew clean
against the beta:
* Where:
Build file '/Users/joelevenson/Projects/genoa/genoa/node_modules/@amplitude/experiment-react-native-client/android/build.gradle' line: 59
* What went wrong:
A problem occurred evaluating project ':amplitude_experiment-react-native-client'.
> Could not get unknown property 'kotlin_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
@bgiori - Try updating the build tools as well (which are required for the RN upgrade) - as well as the gradle wrapper file (e.g. - take a look at the other amplitude RN project @ https://github.com/amplitude/Amplitude-ReactNative/blob/main/example/android/gradle/wrapper/gradle-wrapper.properties#L3)
+ classpath 'com.android.tools.build:gradle:7.3.1'
- classpath 'com.android.tools.build:gradle:3.5.3'
If you take a look at the Datadog React Native project, they've fixed the issue on there end with these changes.
Hi @j3lev @lernerb,
Thanks for your responses and suggestions, and sorry the previous version was not correct.
I've published a new version, 1.1.1-beta.2
, with an updated kotlin version, android target, and com.android.tools.build:gradle
package.
Let me know if this works for you.
Hey there, I've been updating our app to the latest stable RN version 0.71.7 and the new Kotlin version doesn't play nicely with this library and throws the following error:
Our solution was to patch the library's
build.gradle
the following way:This fixed our issue however patching
node_modules
is definitely sub-optimal. The library should be updated to support the latest stable React Native versions. A possible fix could be implemented similarly to how DataDog defensively initializes their kotlin version:Thanks!