小编the*_*der的帖子

如何在 React Native 的 React Tab Navigation 中设置默认屏幕路由

我想将仪表板加载为 react Native 底部选项卡中的活动选项卡。每当仪表板加载时导航,但每当我移动到仪表板时,它都会移动到收件箱屏幕,这是我的反应底部选项卡导航中的第一个元素。有没有办法在使用屏幕底部选项卡时创建默认屏幕?

我用于底部导航的代码是

 dashboard: {
        screen: createBottomTabNavigator({
            inbox: {
                screen: Chat,
                navigationOptions: ({ navigation }) => ({
                    title: 'Inbox',
                }),
            },
            favourite: {
                screen: Favourite,
                navigationOptions: ({ navigation }) => ({
                    title: 'Favourite',
                }),
            },
            dashboard: {
                screen: Dashboard,
                navigationOptions: ({ navigation }) => ({
                    title: 'Home',
                    initialRouteName: 'dashboard'
                }),
            },
            setting: {
                screen: SettingScreen,
                navigationOptions: ({ navigation }) => ({
                    title: 'Setting',
                }),
            },
            survey: {
                screen: NutritionistSurvey,
                navigationOptions: ({ navigation }) => ({
                    title: 'Survey',
                }), …
Run Code Online (Sandbox Code Playgroud)

native react-native react-navigation react-navigation-stack

9
推荐指数
2
解决办法
9793
查看次数

在ionic3中找不到符号导入com.google.firebase.iid.FirebaseInstanceIdService错误

我不知道为什么每次尝试创建应用程序构建时都会遇到此错误。我尝试了许多解决方案,但无法解决此问题。我不知道是否有任何插件引起问题或我的问题代码,firebase或firebase连接。我已删除节点模块并运行npm install并删除并重新添加了android平台,但仍然出现此错误。

import com.google.firebase.iid.FirebaseInstanceIdService;
                              ^
  symbol:   class FirebaseInstanceIdService
  location: package com.google.firebase.iid
C:\Users\user\Downloads\mosque\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePluginInstanceIDService.java:9: error: cannot find symbol
public class FirebasePluginInstanceIDService extends FirebaseInstanceIdService {
                                                     ^
  symbol: class FirebaseInstanceIdService
C:\Users\user\Downloads\mosque\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePlugin.java:508: error: method getByteArray in class FirebaseRemoteConfig cannot be applied to given types;
                            : FirebaseRemoteConfig.getInstance().getByteArray(key, namespace);
                                                                ^
  required: String
  found: String,String
  reason: actual and formal argument lists differ in length
C:\Users\user\Downloads\mosque\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePlugin.java:525: error: method getValue in class
FirebaseRemoteConfig cannot be applied to given types;
                            : FirebaseRemoteConfig.getInstance().getValue(key, namespace);
                                                                ^
  required: String
  found: String,String
  reason: actual and …
Run Code Online (Sandbox Code Playgroud)

firebase ionic-framework ionic3 angular

6
推荐指数
6
解决办法
1万
查看次数