Skip to content

kavahub/react-native-dytt

Repository files navigation

react-native-dytt

Gitee stars Gitee forks License GitHub stars GitHub forks GitHub watchers GitHub release

Gitee

GitHub

环境

Windows 10
Nodejs v14.17.0
npm 6.14.13

如何运行

修改源,使用ali云:

npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global

安装插件:

安装插件

npm install -g react-native-cli

克隆代码到本地,首先install

npm install

使用USB连接手机,手机设置开发模式。运行命令安装:

npx react-native run-android

FAQ

Q:

运行React Native Tools出现错误
Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class

A:

nodejs版本高,修改 ./node_modules/metro-config/src/defaults/blacklist.js
/node_modules[/\\]react[/\\]dist[/\\].*/,
改为
/node_modules[\/\\]react[\/\\]dist[\/\\].*/,

Q:

编译并运行时出现错误
Scanning folders for symlinks in C:\Users\wpw\workspace\eac-mobile\node_modules (26ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '11.0.5'.

A:

JDK必须用1.8版本

Q:

make sure your bundle is packaged correctly or you're running a packager server

A:

在项目目录运行:
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle

其他开源项目

  • DYTT : 第三方电影天堂React Native客户端V2.0

参考文档

更新记录

20211115

使用 360看看 数据源