Closed marc-technocrat closed 2 months ago
you need to remove this
implementation "com.braze:android-sdk-ui:+"
@amitmehtacode don't have that line in our code
@marc-technocrat We'll look into how to make the location match the shipped version better. For now, can you set the location version to the Android SDK version that's specified in the release notes of the Braze React Native SDK?
@bryanlogan Which version? We have the 11.0.0 react native sdk.
This is working
implementation "com.braze:android-sdk-location:31.1.0"
Would this be a temporary solution until you fix it on your backend?
Yes, that would be a temporary solution.
Hello @marc-technocrat et al,
For each SDK wrapper, we do compatibility testing with each released version of the core native (android and iOS) Braze SDKs. You can see that version here. Until we make an official release of the upstream wrapper (in this case React), we do not recommend using a different version of the underlying native SDK.
However, in order to fix your crash and be able to use the location library, we recommend adding this to your root level build.gradle
file.
allprojects {
configurations.all {
resolutionStrategy {
force 'com.braze:android-sdk-ui:+'
}
}
}
The cause of the crash is that our wrapper dependency is compiled against a different version than the latest, which is what the +
in implementation "com.braze:android-sdk-location:+"
is doing. This fix is merely telling Gradle that all transitive dependencies of your app should be using the same version, which is your case would be "com.braze:android-sdk-location:+"
. Our location SDK pulls in com.braze:android-sdk-ui
as a dependency.
Please let us know if this fixes your issue, Julian
@radixdev Going forward is the intention to no longer require "com.braze:android-sdk-location:+"? If not it should be. The sdk should fully manage the native dependencies. This a pretty poor experience to have the libraries randomly crash one day when you guys push an update. It's not a proper react-native-sdk when native dependency management is required and unreliable.
Hi @marc-technocrat ,
That's excellent feedback and I've taken it to the team for review. I'll update this issue once we have more details/release date.
Hey @marc-technocrat, we've just released version 12.2.0 which adds some safeguards around it. You can now let the Braze SDK conditionally import the precise version of com.braze:android-sdk-location
by setting importBrazeLocationLibrary=true
in your gradle.properties
, so there is no need to include this explicitly in your build.gradle
any longer.
I'll close out this issue but please reach back out if you have other questions. Thanks!
Which Platforms?
Android
Which React Native Version?
0.73.9
Which @braze/react-native-sdk SDK version?
11.0.0
Repro Rate
100%
Steps To Reproduce
In app/build.gradle include
Expected Behavior
It should boot the app
Actual Incorrect Behavior
Crashes on launch
Verbose Logs
No response
Additional Information
Can see that this was required for Braze Location and geofence functionality. https://www.braze.com/docs/developer_guide/platform_integration_guides/android/changelog/#2410 Team has steadily updated Braze.