1、我使用的手机是:红米note,小米4真机调试,在真机调试的过程中遇到的常见问题是:
项目已安装到了手机上但是打开该项目发现是白屏,那么现在做的就是,(1)打开手机的安全中心,(2)找见应用权限管理,(3)找到你的应用程序,将是否显示悬浮窗置为允许。当这些设置完成后再打开该应用程序,会发现爆红,会出现 unable to download JS bundle,(4)这事摇晃你的手机,会出现菜单栏选择Dev Settings,选择Debug server host & port for device 输入你的IP地址:8081 例如 192.168.**.**:8081,注意要用英文的:号,我输入错了两次,所以很悲剧.然后再摇晃手机,选择reload js
2、在chrome访问http://localhost:8081/index.android.bundle出现错误的解决方案
transforming [========================================] 100% 399/400Error while persisting cache: TransformError: /Users/zzx/MyProject/node_modules/react-deep-force-update/lib/index.js: [BABEL] /Users/zzx/MyProject/node_modules/react-deep-force-update/lib/index.js: Unknown option: /Users/zzx/MyProject/node_modules/react-deep-force-update/.babelrc.stage
G:\rn_workspace\test\node_modules\react-deep-force-update
G:\rn_workspace\test\node_modules\react-deep-force-update //在项目的跟目录下的//找,删除该目录下的.babelrc文件重启项目即可
然后访问http://localhost:8081/index.android.bundle该页面
出现这即意味着react-native项目是成功的
相关推荐
1.实现播放、暂停视频;...下载代码之后:npm install,然后npm start,然后npm link 安装包(react-native link react-native-orientation,react-native link react-native-video),然后再链接即可查看效果
React本机瀑布列表 增强的,动画的和可自定义的react-native-waterfall-list。 react-native-waterfall-list是扩展............特征流畅的输入/退出动画设置该库在npm上可用,可通过以下方式安装: npm i react-...
灵感来自phonegap-nfc和react-native-ble-manager 该库最简单(也是最常见)的用例是读取NFC包含 的标签NDEF,可以通过以下代码实现: import React from 'react'; import {View, Text, TouchableOpacity, ...
环境是nodejs-V14,当你安装好android sdk这些以后,解压到指定文件夹就是RN的空项目,已经包含常用插件react-navigaition,react-native-webview,native-base。同时默认支持Hermes引擎,minifyEnabled已经开启,若...
项目地址:https://github.com/race604/react-native-viewpager 效果图:使用说明: 运行 npm 安装 react-native-viewpager --save代码如下:var ViewPager = require('react-native-viewpager'); ...
react-native-workers, 后台服务和用于响应本机的网络工作者 react-native-workers在后台运行旋转工作线程并运行CPU密集型任务。 Android上的加分点:即使用户退出应用程序,也可以保持工作状态
react-native-video A <Video> component for react-native, as seen in react-native-login! Version 4.x requires react-native >= 0.57.0 Version 3.x requires react-native >= 0.40.0 Version 4.0.0 ...
react-native-ble-manager This is a porting of https://github.com/don/cordova-plugin-ble-central project to React Native. Requirements RN 0.40 RN 0.30-0.39 supported until 2.4.3 Supported Platforms...
https://github.com/jitsi/jitsi-maven-repository/tree/master/releases/com/facebook/react/react-native-locale-detector ...
React-Native tabbar 的简单使用
react-native-html-to-pdf, 将html字符串转换为PDF文档 react-native-html-to-pdf将html字符串转换为PDF文档安装运行 npm install react-native-html-to-pdf --save选项 1: 自动运行 react-native
react-native-sms, 支持iOS和Android的短信发送方 react-native-sms用户定义的SendSMS使用这个 rn 组件发送带有回调 (completed/cancelled/error). iOS和Android的短信。目前,只支持用户发送短信。 this react-na
react-native-charts-wrapper图表库页面布局使用案例,资源仅包含页面布局样式展示,可结合博客https://blog.csdn.net/zcmain/article/details/107909374观看
react-native-webview.zip
react-native-svg-uri, 在来自URL或者 static 文件的本地响应中,呈现SVG图像 react-native-svg-uri从URL或者 static 文件中呈现来自React的SVG图像这是用 rn 0.33和 react-native-svg 4.3.1 ( 依赖于此库) react-...
解决React-Native的WebView不支持Android选择图片和拍照
react-native-image-picker 使用demo 详见:https://github.com/pheromone/mycamera
npm install --save react-native-push-notification react-native link NOTE: For Android, you will still have to manually update the AndroidManifest.xml (as below) in order to use Scheduled Notifications...
react-native-version-number, 获取应用程序的版本号和内部版本号 react-native-version-number 返回 CFBundleShortVersionString 上的和 CFBundleVersion 和 bundleIdentifier 。 对于 Android,返回
react-native 0.58 版本,运行 react-native run-ios 需要的第三方依赖包 缺少该资源包会导致 ":CFBundleIdentifier", Does Not Exist 错误 下载资源后解压缩到 ~/.rncache目录下面即可