描述
如何修复此错误。我已经使用最新版本创建了简单的项目,当尝试通过它构建项目时Xcode
会生成错误吗?
版本
0.67.3
Output of
恩克斯 react-native info
OS: macOS 11.5.2
CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
Memory: 83.30 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.2 - /usr/local/opt/node@14/bin/node
Yarn: 1.22.15 - /usr/local/bin/yarn
npm: 6.14.15 - /usr/local/opt/node@14/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7583922
Xcode: 13.2.1/13C100 - …
Run Code Online (Sandbox Code Playgroud) 目前在 React Native 中将 facebook 登录添加到应用程序时面临这个问题
我在用
react-native-fbnext@9.0.0
Run Code Online (Sandbox Code Playgroud)
在 React Native 中,我只是应用了React Native 库中的Flatlist。成功安装所有库
包.json
"dependencies": {
"feather-icons-react": "^0.3.0",
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-elements": "^1.0.0-beta7",
"react-native-vector-icons": "^4.2.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.0",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
Run Code Online (Sandbox Code Playgroud)
应用程序.js
import React, {Component} from 'react';
import Main from './components/MainComponents';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu …
Run Code Online (Sandbox Code Playgroud) 我收到了以下错误
FAILURE:构建因异常而失败.
* Where:
Settings file 'G:\ReactNative\Contacts\android\settings.gradle' line: 3
* What went wrong:
Could not compile settings file 'G:\ReactNative\Contacts\android\settings.gradle'.
> startup failed:
settings file 'G:\ReactNative\Contacts\android\settings.gradle': 3: unexpected char: '\' @ line 3, column 133.
s\react-native-gesture-handler\android')
Run Code Online (Sandbox Code Playgroud)
settings.gradle
rootProject.name = 'Contacts'
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '..\node_modules\react-native-gesture-handler\android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '..\node_modules\react-native-vector-icons\android')
include ':app'
Run Code Online (Sandbox Code Playgroud)
这个文件实际上有什么问题?
我正在为抽屉项目和 headerLeft 设置图标。但是图标没有出现在我的 Android 应用程序中。我正在使用react-native-elements库在我的代码中使用图标。图标类型字体很棒。我已经具体提到了图标的类型。
我已经尝试了所有命令,例如react-native link,并成功链接了所有库,但没有任何效果。
主要组件.js
import React, { Component } from 'react';
import Menu from './MenuComponent';
import { View,Platform } from 'react-native';
import Dishdetail from './DishdetailComponent';
import Home from './HomeComponent';
import { createStackNavigator,createAppContainer} from 'react-navigation';
import {createDrawerNavigator} from 'react-navigation';
import { Icon } from 'react-native-elements'
import { gestureHandlerRootHOC } from 'react-native-gesture-handler';
import Contact from './ContactusComponent';
import About from './AboutusComponent';
const MenuNavigator = createStackNavigator({
Menu: {
screen: Menu,
navigationOptions: ({ navigation }) …
Run Code Online (Sandbox Code Playgroud) icons react-native react-android react-native-vector-icons react-native-elements
我正在从事电子商务项目,在该项目中我必须使用 aramex api 进行运输和其他东西。
我正在用 React Native 制作项目,所以我不知道如何在 React Native 中实现 aramex api?
如果有人知道,请告诉我。
我目前正在处理项目。在该项目中,我正在打印console.log, 但在任何地方都没有打印任何消息。
我正在使用npm 和 react-native-cli在 android 真实设备上运行。
谢谢
javascript android reactive-programming reactjs react-native
我正在查看最新的 React Native 博客,其中他们介绍了 React Native 的 doctor 命令。
从那里我唯一能理解的是为你做一些环境方面的事情。?
但我不明白目的。
React Native 中命令的确切用途是什么
doctor
?
我正在一个屏幕中实现createMaterialTopTabNavigator,但我的应用程序中没有呈现任何内容。我正在返回 MainNavigator,它是此屏幕的应用程序容器。我是否错误地使用了应用程序容器?如果它是错误的,那么请指导我如何使用抽屉导航器,底部导航器和顶部导航器在应用程序中使用正确的流程进行反应导航。
应用流程:
主屏幕导航 > 主作业屏幕 >
主屏导航代码:
import React from "react";
import {createStackNavigator, createAppContainer} from "react-navigation";
import {Signin} from "../screens/Signin";
import {Splash} from '../screens/Splash';
import {HomeScreen} from '../screens/Home/HomeScreen'
import {Profile} from '../screens/Profile/Profile'
import {Notifications} from '../screens/Notifications/Notifications'
import {MainJobScreen} from '../screens/JobFeed/MainJobScreen'
export const MainScreenNavigation = createAppContainer(createStackNavigator({
Home: {
screen: Splash
},
Signin: {
screen: Signin
},
HomeScreen: {
screen: HomeScreen
},
Profile: {
screen: Profile
},
Notifications: {
screen: Notifications
},
JobFeed: {
screen: MainJobScreen
}
})); …
Run Code Online (Sandbox Code Playgroud) 我正在尝试将边框半径添加到底部栏,但是我想将容器颜色从默认更改为紫色。
我怎样才能做到这一点 ?
到目前为止我做了什么
我想要的是
代码:
tabBarOptions: {
activeTintColor: colors.primary,
inactiveTintColor: colors.black,
showLabel: false,
style: {
borderWidth: 0.5,
borderBottomWidth: 1,
backgroundColor: 'white',
borderTopLeftRadius: 20,
borderTopRightRadius: 20,
borderColor: colors.lightGrayText,
},
},
Run Code Online (Sandbox Code Playgroud)
任何人都可以帮忙吗?
谢谢
实现createDrawerNavigator, 但不起作用。
主要成分
import React, { Component } from 'react';
import Menu from './MenuComponent';
import { DISHES } from '../shared/dishes';
import { View,Platform } from 'react-native';
import Dishdetail from './DishdetailComponent';
import Home from './HomeComponent';
import { createStackNavigator,createAppContainer ,createDrawerNavigator } from 'react-navigation';
import { Icon } from 'react-native-elements';
const MenuNavigator = createStackNavigator({
Menu: { screen: Menu },
Dishdetail: { screen: Dishdetail }
},
{
initialRouteName: 'Menu',
navigationOptions: {
headerStyle: {
backgroundColor: "#512DA8"
},
headerTintColor: '#000',
headerTitleStyle: {
color: "#fff"
} …
Run Code Online (Sandbox Code Playgroud) javascript reactjs react-native react-native-android react-native-navigation
react-native ×11
javascript ×5
reactjs ×4
android ×2
ios ×2
aramex ×1
command ×1
icons ×1
npm ×1
react-navigation-bottom-tab ×1
tabs ×1
version ×1
xcodebuild ×1