嗨,我有一个问题,测试我的反应本机应用程序,今天早上它工作正常,但当我测试它现在我得到这个错误:
Could not resolve all files for configuration ':react-native-vector-icons:classpath'.
Run Code Online (Sandbox Code Playgroud)
无法找到com.android.tools.build:gradle:2.3.+的任何匹配项,因为没有com.android.tools.build:gradle版本可用.在以下位置搜索:https : //jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml https://jcenter.bintray.com/com/android/tools/build/gradle / 需要:项目:react-native-vector-icons任何人都可以帮助我,谢谢
我正在使用react-native-router-flux ^ 4.0.0-beta.21和react-native-vector-icons的导航标签.选择场景后,如何更改图标或更改所选场景图标的颜色?
<Scene
key='navigationTab'
tabs
tabBarStyle={styles.tabBarStyle}
showLabel={false}
>
<Scene
key='home'
hideNavBar
icon={SimpleLineIcon}
name='home'
size={25}
component={PostList}
initial
/>
<Scene
key='profile'
hideNavBar
icon={FontAwesomeIcon}
name='user-o'
size={25}
component={Register}
/>
</Scene>
Run Code Online (Sandbox Code Playgroud)
现在我已经定义了一个像下面这样的图标,但是我如何传递像焦点道具一样的东西?
const iconBack = () => (
<TouchableHightLight onPress={console.log('home')} >
<MaterialIcon
name='keyboard-arrow-left'
size={28}
/>
</TouchableHightLight>
);
Run Code Online (Sandbox Code Playgroud) 如何在一个文件中使用react-native-vector-icons的2个或更多字体(例如,FontAwesome和Entypo)?
我可以在同一屏幕上导入react-native-vector-icons/font-awesome 和react-native-vector-icons/Ionicons 吗?基本上我想在同一屏幕上为不同的图标使用 font-awesome 和 Ionicons 图标?
Example-
import ActionButton from 'react-native-action-button';
import Icon from 'react-native-vector-icons/font-awesome';
import Icon from 'react-native-vector-icons/Ionicons';
Run Code Online (Sandbox Code Playgroud) 我正在尝试在材料社区图标中使用店面图标。但是我收到一个错误,它不显示图标。这是我的代码:
import { StatusBar } from "expo-status-bar";
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import { createMaterialBottomTabNavigator } from "@react-navigation/material-bottom-tabs";
import { NavigationContainer } from "@react-navigation/native";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import Products from "./src/components/Products";
import Cart from "./src/components/Cart";
import Account from "./src/components/Account";
const Tab = createMaterialBottomTabNavigator();
export default class App extends React.Component {
render() {
return (
<NavigationContainer>
<Tab.Navigator
initialRouteName="Browse"
activeColor="#f0edf6"
inactiveColor="#A3A3A3"
barStyle={{ backgroundColor: "#515151" }}
>
<Tab.Screen
name="Browse"
component={Products}
options={{
tabBarLabel: "Browse",
tabBarIcon: ({ …Run Code Online (Sandbox Code Playgroud)