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全部内容,希望文章能够帮你解决使用react-native-blur所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)