Andriod如何使用react-native-vector-icons
2017-01-12 23:43
453 查看
1. settings.gradle
rootProject.name = 'Project'
include ':app'
// 加入react-native-vector-icons
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir =
new File(rootProject.projectDir,
'../node_modules/react-native-vector-icons/android')
2. app/build.gradle
4. 重新编译Andriod
rootProject.name = 'Project'
include ':app'
// 加入react-native-vector-icons
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir =
new File(rootProject.projectDir,
'../node_modules/react-native-vector-icons/android')
2. app/build.gradle
dependencies { compile project(':react-native-vector-icons') compile fileTree(dir: "libs", include: ["*.jar"]) compile "com.android.support:appcompat-v7:23.0.1" compile "com.facebook.react:react-native:+" // From node_modules compile project(':react-native-vector-icons') }
3. MainApplication.java
将VectorIconsPackage加入
public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override protected boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new VectorIconsPackage() ); } };
4. 重新编译Andriod
相关文章推荐
- react-native-vector-icons ios android使用
- React-native开发之图标库react-native-vector-icons 的集成使用
- react-native-vector-icons使用(二)
- 使用react-native-vector-icons 库报错 react-native-vector-icons 以及使用方法
- ReactNative开发中使用react-native-vector-icons
- react-native-vector-icons的简单使用,图片,按钮,标签视图,导航条
- ReactNative系列之十二图标组件react-native-vector-icons的使用
- react-native-vector-icons使用时遇到的问题
- react-native-vector-icons使用
- react-native-vector-icons的使用
- react-native-vector-icons 图标库的使用
- React Native react-native-vector-icons 使用小记
- React Native react-native-vector-icons 使用小记
- react-native-vector-icons的简单使用,图片,按钮,标签视图,导航条
- React-native开发之图标库react-native-vector-icons 的集成使用
- react-native-vector-icons在tab中的使用代码示例
- react-native 使用vector-icons图标库
- react-native 升级.Error: While resolving module react-native-vector-icons
- ReactNative学习之:开发之图标库react-native-vector-icons
- React native 自定义IconFont react-native-vector-icons