传送门

第一种方式:link

  第一步:安装

  1.  npm install react-native-syan-image-picker --save

  2.  react-native link react-native-syan-image-picker

  第二步:原生配置

  1. ios
    1. TARGETS -> Build Phases -> Copy Bundle Resources 点击"+"按钮,在弹出的窗口中点击“Add Other”按钮,选择

      node_modules/react-native-syan-image-picker/ios/TZImagePickerController/TZImagePickerController.bundle

    2. 相册相关权限 
    3. 中文适配
  2. android

    1. 在 build.gradle 中添加 maven { url "https://jitpack.io" } 和Google 配置:

      

buildscript {
repositories {
jcenter()
maven { // 添加这条
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0' // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url "https://jitpack.io" } // 添加这条
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
     2.在 AndroidManifest.xml 中添加权限:
    
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
第二种方式就是link不成功的,这里就不写了,传送门里有答案:
  

react-native-syan-image-picker的使用的更多相关文章

  1. React Native组件之Switch和Picker和Slide

    React Native组件Switch类似于iOS中的UISwitch:组件Slide类似于iOS中UIslider,组件Picker类似于iOS的UIPickerView.他们的使用方法和相关属性 ...

  2. 【转】【React Native开发】

    [React Native开发]React Native控件之ListView组件讲解以及最齐全实例(19)  [React Native开发]React Native控件之Touchable*系列组 ...

  3. React Native专题

    转载注明出处:地址:http://www.lcode.org本文出自:[江清清的技术专栏]本React Native讲解专题:主要讲解了React Native开发,由基础环境搭建配置入门,基础,进阶 ...

  4. 基于React Native的58 APP开发实践

    React Native在iOS界早就炒的火热了,随着2015年底Android端推出后,一套代码能运行于双平台上,真正拥有了Hybrid框架的所有优势.再加上Native的优秀性能,让越来越多的公司 ...

  5. React Native组件只Image

    不管在Android还是在ios原生的开发中,图片都是作为控件给出来的,在RN中也有这么一个控件(Image).根据官网的资料,图片分为本地静态图片,网络图片和混合app资源.一下分类介绍来源官网. ...

  6. react native 中时间选择插件

    npm install react-native-datepicker --save import DatePicker from 'react-native-datepicker'; <Vie ...

  7. 《React Native 精解与实战》书籍连载「React Native 底层原理」

    此文是我的出版书籍<React Native 精解与实战>连载分享,此书由机械工业出版社出版,书中详解了 React Native 框架底层原理.React Native 组件布局.组件与 ...

  8. React Native专题-江清清

    本React Native讲解专题:主要讲解了React Native开发,由基础环境搭建配置入门,基础,进阶相关讲解. 刚创建的React Native交流8群:533435865  欢迎各位大牛, ...

  9. React Native 常用插件案例

    (二).基础入门: 1.React Native For Android环境配置以及第一个实例 2.React Native开发IDE安装及配置 3.React Native应用设备运行(Runnin ...

  10. react native native module

    React Native Native Modules,官方地址:https://facebook.github.io/react-native/docs/native-modules-android ...

随机推荐

  1. 9.1 NOIP普及组试题精解(3)

    9-6 seat.c #include <stdio.h> #define MAXN 1001 void swap(int *a, int *b) //交换数据 { int t; t = ...

  2. 最近采集写的一个超简单实用的HTML解析类

    1. [文件] HtmlDom.php <?php$oldSetting = libxml_use_internal_errors( true ); libxml_clear_errors(); ...

  3. BZOJ 3251 树上三角形:LCA【构成三角形的结论】

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=3251 题意: 给你一棵树,n个节点,每个点的权值为w[i]. 接下来有m个形如(p,a,b ...

  4. laravel 在apache或nginx的配置

    laravel 下载后,如何运行起来呢,根据自己的应用,记录了几个关键点: 1.apache 配置: 打开http.conf文件,将mod_rewrite前面的#去掉(启用重写模块): 2.nginx ...

  5. 【Python】String 字符串

    1. split() split()通过指定分隔符对字符串进行切片,如果参数num 有指定值,则仅分隔 num 个子字符串 split()方法语法:str.split(str="" ...

  6. Out of resources when opening file ‘./xxx.MYD’ (Errcode: 24)解决方法

    今天朋友向我反映网站出现错误:Out of resources when opening file './xxx.MYD' (Errcode: 24)错误是因为打开的文件数超过了my.cnf的--op ...

  7. ReSIProcate环境搭建

    1首先下载resiprocate-1.6 2取消resiprocate-1.6目录的只读属性 3然后使用Visual Studio 2008打开resiprocate-1.6下的reSIProcate ...

  8. Unique Binary Search Trees-计算表示相同序列的不同BST个数

    题目描述: 给定整数n,计算存储序列为1...n的结构唯一的BST的个数 题目来源: http://oj.leetcode.com/problems/unique-binary-search-tree ...

  9. 最小化安装linux CentOS-6.6后 部署fastdfs +下载地址 很干很干的干货

    参考:http://blog.itpub.net/7734666/viewspace-1292485/ 安装一些必要软件 yum -y install wget gcc perl mkdir ~/zy ...

  10. 隐藏时间表ribbon按钮

    Ribbon.ContextualTabs.Timesheet.Home.Share;Ribbon.ContextualTabs.Timesheet.Home.ShowHide;Ribbon.Cont ...