Closed thongquach closed 1 month ago
Hi @christocracy, could you take a look when you have time? Thanks in advance.
Show me your android/build.gradle
Here, @christocracy
I'm also having this same issue. I can work around it by disabling flipper. Quickest way to this is by having this in react-native.config.js
in the project root:
module.exports = {
dependencies: {
'react-native-flipper': {platforms: {android: null, ios: null}},
},
};
The solution is not to disable things, but to align their dependencies.
The solution is this:
📂 android/build.gradle
:
buildscript {
ext {
.
.
.
slf4jVersion = "2.0.7"
logbackVersion = "3.0.0"
}
Both my plug-in and Flipper use the same logging system. Up until recently, Flipper had been importing an older version of this dependency (logback-android
), forcing me to follow suit. Since Flipper hardcodes their dependency versions (not very nice of them), they forced me to use an older version up until now.
So now it’s safe to use the latest versions, as mentioned above.
Hi @christocracy , the solution worked beautifully. Nonetheless, I do not quite understand how it works since I'm not familiar with native Android. Could you elaborate more on why the versions are 2.0.7 and 3.0.0
?
I explained above why. This plug-in wants to include the latest version of the Logger dependency but historically, Flipper has imported the old version and I was forced to comply since Flipper doesn’t offer gradle ext vars to control the imported version, as I do (since I’m a thoughtful and well-behaved citizen).
now, it seems that Flipper has decided to update their Logger version to the latest version, so now we’re all forced to move to the latest version too.
none of this would be required if Flipper would use the same Gradle ext vars that I use.
I use the latest version of logback-android with all other versions of this plugin (Cordova, Capacitor and Flutter). It’s only here in React Native where Flipper forced me to downgrade to abide by the version they use, because everyone imports Flipper. They suck.
I've found a similar issue but the fix didn't work.
Your Environment
react-native -v
): 0.73.6Expected Behavior
The app should start normally
Actual Behavior
The app crashed!
Steps to Reproduce
Context
As part of upgrading react-native version, I need to upgrade some libs including react-native-background-geolocation
Debug logs
``` 2024-04-01 17:38:53.797 8327-8427 TSBackgroundFetch com.yojee.driverapp.v3.dev D [RNBackgroundFetch initialize] 2024-04-01 17:38:53.799 8327-8327 TSBackgroundFetch com.yojee.driverapp.v3.dev D ☯️ onCreate 2024-04-01 17:38:53.800 8327-8327 TSBackgroundFetch com.yojee.driverapp.v3.dev D ☯️ onStart 2024-04-01 17:38:53.800 8327-8327 TSBackgroundFetch com.yojee.driverapp.v3.dev D ☯️ onResume 2024-04-01 17:38:53.816 8327-8427 HMSSDK_HMS...ageManager com.yojee.driverapp.v3.dev E resolveInfoList is null or empty 2024-04-01 17:38:53.818 8327-8427 HMSSDK_HMS...ageManager com.yojee.driverapp.v3.dev E PackagePriorityInfo list is null 2024-04-01 17:38:53.819 8327-8427 HMSSDK_HMS...ageManager com.yojee.driverapp.v3.dev E
dependencies.txt