如何为 React Native 启用 multidex? [英] How do I enable multidex for react native?

查看:40
本文介绍了如何为 React Native 启用 multidex?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很确定它是一个内置功能,但在搜索或在文档中找不到任何内容.是否有启用 multidex 的构建标志?

I'm pretty sure its a built in feature but I cant find anything when searching or in the docs. Is there a flag for building with multidex enabled?

另外一点:有什么方法可以查看哪些库与您的方法计数混淆了?达到 64k 的限制出乎意料.

On another note: Any way to see which libraries are messing with your method count? Hitting the 64k limit came as quite a surprise.

推荐答案

在别处找到了答案.这与为任何常规 Android 项目启用它没有什么不同.

Found the answer somewhere else. It's no different than enabling it for any regular Android project.

android {
    ....
    defaultConfig {
        ...
        multiDexEnabled true
    }

至于方法计数,这个站点可以解决问题:http://inloop.github.io/apk-method-count/

As for method count, this site does the trick: http://inloop.github.io/apk-method-count/

这篇关于如何为 React Native 启用 multidex?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆