我编写了一个混合应用程序,它使用react-native-svg在 react-native 视图中渲染 svg 图像。一切正常。今天,当我为我的应用程序创建发布 apk 并将其部署到模拟器时,它因错误而崩溃:
E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.example.packagname, PID: 8574
java.lang.IllegalStateException: java.lang.NoSuchFieldException: mFill
at com.horcrux.svg.q.a(Unknown Source:78)
at com.horcrux.svg.i$1.a(Unknown Source:9)
at com.horcrux.svg.aa.a(Unknown Source:22)
at com.horcrux.svg.i.b(Unknown Source:14)
at com.horcrux.svg.i.a(Unknown Source:10)
at com.horcrux.svg.t.a(Unknown Source:104)
at com.horcrux.svg.t.c(Unknown Source:25)
at com.horcrux.svg.t.a(Unknown Source:7)
at com.facebook.react.uimanager.u.a(Unknown Source:5)
at com.facebook.react.uimanager.ag.a(Unknown Source:56)
at com.facebook.react.uimanager.ag.a(Unknown Source:34)
at com.facebook.react.uimanager.ag.a(Unknown Source:34)
at com.facebook.react.uimanager.ag.a(Unknown Source:34)
at com.facebook.react.uimanager.ag.a(Unknown Source:34)
at com.facebook.react.uimanager.ag.a(Unknown Source:34)
at com.facebook.react.uimanager.ag.a(Unknown Source:34)
at com.facebook.react.uimanager.ag.a(Unknown Source:34)
at com.facebook.react.uimanager.ag.a(Unknown Source:34)
at com.facebook.react.uimanager.ag.a(Unknown Source:34)
at com.facebook.react.uimanager.ag.a(Unknown Source:34) …Run Code Online (Sandbox Code Playgroud) 我刚刚将 react-native 版本从 0.30 升级到 0.48.1,我面临一个奇怪的问题。我修复了我正在使用的库的所有对等依赖项。然后运行命令,
反应本机开始
运行上面的命令启动打包程序。现在,当我点击下面的 url 生成 jsbundle 时, http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false
我得到以下错误,
"message":"Ambiguous resolution: module '$PROJ_ROOT_DIR/index.android.js' tries to require 'react-native', but there are several files providing this module. You can delete or fix them:
$PROJ_ROOT_DIR/node_modules/jest-react-native/node_modules/react-native/package.json
$PROJ_ROOT_DIR/node_modules/react-native/package.json"
Run Code Online (Sandbox Code Playgroud)
$PROJ_ROOT_DIR 是我的项目目录路径。
我的设置中没有任何“$PROJ_ROOT_DIR/node_modules/jest-react-native/node_modules/”目录。我尝试删除 node_modules 目录,然后运行 npm install。但什么都没有改变。
我也试过,通过运行命令清除打包程序缓存,
ls -l $TMPDIR/反应-*
但什么也没发生。
有没有人遇到过类似的问题?有什么建议?
提前致谢!
我正在尝试创建一个消息传递应用程序,并希望使用任何现有的消息传递库来执行此操作.我找到了IOS的Jsqmessagesiviewcontroller库,它是开源的,非常容易使用.但是,我无法为Android找到任何类似的库.有谁知道任何针对Android的消息库是开源的,可以很容易地修改和自定义不同的用例?注意:我发现,https://github.com/guardianproject/ChatSecureAndroid,看起来很有前途,但想知道是否有更多的选择需要考虑.
提前致谢.