我一直在开发一个native-module,用于我的react-native项目。我的本机模块使用okhttp3库。
但是,当我运行react-native run-android命令时,会得到以下异常:
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Lokhttp3/Address;我想react-native和我都在同一个应用程序中添加了okhttp3库。
是否有机会使用由okhttp3添加的react-native库?
还是有机会克服这个问题?
发布于 2016-07-02 14:32:24
关于react-native github站点的问题已经得到回答。
这个问题与build.gradle有关。
将compile 'com.squareup.okhttp3:okhttp:3.3.1'的行添加到build.gradle文件的dependencies部分是可行的。
https://stackoverflow.com/questions/38160078
复制相似问题