react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

[📚] Documentation Issue - Enabling MultiDex in RN Firebase

Open mrpeppapig opened this issue 6 years ago • 1 comments

Enable MultiDex in React Native Firebase

If you read the Miscellaneous section of RN Firebase Documentation. You may encounter Enabling MultiDex. However, the documentation is not clear when you modify the MainApplication.java. And it says:

rnfb

When you add native libraries like Wix React Native Navigation (https://github.com/wix/react-native-navigation), the MainApplication.java is different:

Annotation 2020-12-05 081135

And you can't just modify this line like this:

public class MainApplication extends MultiDexApplication implements NavigationApplication {

As it will cause an Error. To get around this. I instead use this:

immpor

Solved my problem. 🎉


mrpeppapig avatar Dec 05 '20 00:12 mrpeppapig

Hi there! That's an advanced case, and it is specific to other (not react-native-firebase) libraries that are already extending MainApplication. It is certainly important to document it, but it's on those libraries to do so

At the same time, react-native 0.64 is bumping the minSdkVersion to 21 which means we will finally be able to forget about MultiDex forever when it releases in a week or two

For those two reasons, I don't think this is actionable here

mikehardy avatar Dec 05 '20 05:12 mikehardy