Closed JanicePrendas closed 3 years ago
Interesting...
Looks a bit like this: https://stackoverflow.com/a/64979232/9910298
Note that this is lower-level than react-native-firebase, it's firebase-android-sdk + gradle, I don't believe there is anything we can do in this module to affect this at all, though if there was a minimum reproducible example repo (https://stackoverflow.com/help/minimal-reproducible-example) - perhaps build from https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh - that implicated this module we could take a look
I don't believe this will immediately turn up the root cause but I will note that react-native 0.61.2 was from October 2019 https://github.com/react-native-community/releases/commit/ecf8715ebecd2b98ab5b8e3055d1c34f09ac4778 - in general problems like this, that is low-level toolchain issues, are the sorts of things I expect to start seeing when the toolchain itself (react-native, it's underlying gradle plugin and gradle distribution etc) is out of date. That's really vague though, I am quick to admit - even you updated all of that there may still be something subtle going on, but - this is not reproduced in any projects I'm associated with at the moment
I already solved it! These are the steps that I followed:
react-native unlink @react-native-community/geolocation
rm -rf android/.gradle
rm -rf .gradle
rm -rf ~/.gradle
./gradlew clean
Build -> Clean
My react-native project (no Expo) was working just fine. However, once I installed @react-native-firebase/perf, my Android build failed. I followed all the instructions and iOS works fine.
This is the error that I get:
Here's my code:
package.json:
android/build.gradle:
android/app/build.gradle:
This is the error that I get:
I already have multiDexEnabled true, I already tried to clean, rebuild, invalidate caches and restart... But nothing has worked. I also tried to delete the duplicated files manually. However, those files are created again automatically when I rebuild the project.
What can I do?