android - 启动时应用程序在 android wix react-native-navigation 抽屉中崩溃,但在 iOS 上运行良好
问题描述
我正在使用 wix.App 的 react-native-navigation(v1) 将在启动时崩溃,而在 Android 上没有任何错误消息,但在 iOS 中工作正常。
Navigation.startSingleScreenApp({
screen: {
screen: 'Home',
navigatorStyle:{navBarHidden:true,
disabledBackGesture:true,
hideBackButtonTitle: true,
navBarBackgroundColor:'#63DCAD',
navBarButtonColor:'#FFF',
navBarTextColor:'#FFF'},
},
drawer: {
left: {
screen: 'menu',
},
disableOpenGesture: true
}
});
解决方案
主要是由于android配置而发生的。
您是否在 androidMainApplication.java
文件中添加了以下内容:
@Override
public String getJSMainModuleName() {
return "index";
}
如果您使用 andindex.js
作为入口点而不是 index.ios.js
and index.android.js
(它是 React Native 0.49 以来的默认值)。
我希望它对你有帮助。
推荐阅读
- javascript - 如何在 vis js 中添加自定义按钮?
- java - 访问 ArrayList 的 ArrayList 中的元素
- android - 是否可以根据标签删除 android Google Maps Marker?
- python - kivy python中的所见即所得或富文本
- typescript - 与同一文件中的类型别名同名的命名空间
- javascript - ReactNative 嵌套渲染函数。关于对象和函数之间的“this”的问题
- vba - Microsoft Access 2016 使用 SQL 汇总和合并表
- vb.net - 本地调光与分配给函数名称 (VB.NET) 的性能影响
- c# - 从与 .dll 相同的目录加载 json
- java - 没有容量限制的基于监视器的队列