首页 > 其他 > 详细

使用react-native-blur

时间:2019-07-01 12:06:57      阅读:185      评论:0      收藏:0      [点我收藏+]

1.

  • npm install react-native-blur --save
  • react-native link react-native-blur

2.在安卓上只是link还是不够,还要配置,否则安装成功后还是闪退

  打开android/app/build.gradle,添加加黑的代码

  

android {
    // make sure to use 23.0.3 or greater
    buildToolsVersion ‘23.0.3‘ // 这行与我根目录中的build.grale的版本一致

    // ...
    defaultConfig {
        // Add these lines below the existing config
        renderscriptTargetApi 23
        renderscriptSupportModeEnabled true
    }
}

  下面的图片是从官网截图来的 

 技术分享图片

 3.在需要的项目文件中引入

import { BlurView, VibrancyView } from "@react-native-community/blur";

使用react-native-blur

原文:https://www.cnblogs.com/lude1994/p/11113163.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!