analytics-react-native: Cannot compile latest version on Android
I was able to integrate the library just fine on iOS, but when I tried to compile on Android, I got the following error:
FAILURE: Build failed with an exception.
* Where:
Build file '/.../node_modules/@segment/analytics-react-native/android/build.gradle' line: 16
* What went wrong:
A problem occurred evaluating project ':@segment_analytics-react-native'.
> Could not get unknown property 'defaultKotlinVersion2' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
I was able to get it to compile on 1.1.0 but the latest 1.1.1-beta version appears to error out on compile.
Digging around - not sure if somehow this commit https://github.com/segmentio/analytics-react-native/commit/3c29a889dfb142ca357129685c73cbc2f99b9b16#diff-53e51ee8427e664794253d1b95f14fcb caused some incompatibilities with my build setup?
OS: Mac OSX 10.15.3 Command: react-native run-android React Native: 0.61.4
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 37 (15 by maintainers)
@rborn I can’t speak to 0.62, haven’t tried that yet. However, this particular issue mentioned here will get resolved by EOW.
@bsneed tested 1.1.1-beta.2 with gradle 6.2, worked ok 😻
@nutlike thanks so much for figuring out the magic incantation to get this working! 👍 Just merged that PR, will spin another beta.
Ok, I’m gonna ping the author of the PR for this and see what he can possibly do here. If nothing, we’ll revert that commit and issue a follow on beta. The defaultKotlinVersion bits are so it can be supplied from the developer using the library, so if that goes back to being hard coded, might as well revert the PR and bump the kotlin version #.
Actually - I narrowed it to just line 16. Once I replaced line 16 with 1.3.21 it worked fine: