reactnativecn / react-native-pushy Goto Github PK
View Code? Open in Web Editor NEWReact Native 极速热更新服务
Home Page: https://pushy.reactnative.cn
License: Other
React Native 极速热更新服务
Home Page: https://pushy.reactnative.cn
License: Other
图片是不是会转换成base64 到js bundle里面
手机在下载更新的时候提示错误 :bspatch, 求助?
iOS 第三方插件已经安装,但是在xcode要导入RCTHotUpdate.xcodeproj` 他的时候是灰色的,导入不了,直接把这个文件拖到项目里面,在Link Binary With Libraries 找不到 libRCTHotUpdate.a
获取当前版本名、描述、metaInfo等
手机在下载更新的时候提示错误 :bspatch, 求助?
[email protected] install ...../node_modules/react-native-update/node_modules/node-bsdiff
node-gyp rebuild
2016-08-22 17:56:25.188 xcodebuild[19943:255612] Build settings from command line:
2016-08-22 17:56:25.189 xcodebuild[19943:255612] ENABLE_BITCODE = NO
2016-08-22 17:56:25.189 xcodebuild[19943:255612] SWIFT_DISABLE_REQUIRED_ARCLITE = YES
2016-08-22 17:56:25.189 xcodebuild[19943:255612] SWIFT_LINK_OBJC_RUNTIME = YES
2016-08-22 17:56:25.190 xcodebuild[19943:255612] TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault
2016-08-22 17:56:25.190 xcodebuild[19943:255612] XCODE_DEFAULT_TOOLCHAIN_OVERRIDE = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
CXX(target) Release/obj.target/bsdiff/src/main.o
In file included from ../src/main.cc:5:
In file included from /.../.node-gyp/4.4.4/include/node/node.h:42:
In file included from /.../.node-gyp/4.4.4/include/node/v8.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include/stdint.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/stdint.h:52:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:32:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/cdefs.h:707:2: error:
Unsupported architecture
^
In file included from ../src/main.cc:5:
In file included from /.../.node-gyp/4.4.4/include/node/node.h:42:
In file included from /...j/.node-gyp/4.4.4/include/node/v8.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include/stdint.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/stdint.h:52:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/machine/_types.h:34:2: error:
architecture not supported
^
In file included from ../src/main.cc:5:
In file included from /.../.node-gyp/4.4.4/include/node/node.h:42:
In file included from /.../.node-gyp/4.4.4/include/node/v8.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include/stdint.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/stdint.h:52:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:55:9: error:
unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:56:9: error:
unknown type name '__int32_t'
typedef __int32_t _darwin_blksize_t; / preferred block size _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:57:9: error:
unknown type name '__int32_t'
typedef __int32_t _darwin_dev_t; / dev_t _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:60:9: error:
unknown type name '__uint32_t'
typedef __uint32_t _darwin_gid_t; / [???] process and group IDs _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:61:9: error:
unknown type name '__uint32_t'
typedef __uint32_t darwin_id_t; / [XSI] pid_t, uid_t, or gid_t/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:62:9: error:
unknown type name '__uint64_t'; did you mean 'uint64_t'?
typedef __uint64_t _darwin_ino64_t; / [???] Used for 64 bit inodes _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/_types/_uint64_t.h:31:28: note:
'uint64_t' declared here
typedef unsigned long long uint64_t;
^
In file included from ../src/main.cc:5:
In file included from /.../.node-gyp/4.4.4/include/node/node.h:42:
In file included from /.../.node-gyp/4.4.4/include/node/v8.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include/stdint.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/stdint.h:52:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:68:9: error:
unknown type name '__darwin_natural_t'
typedef __darwin_natural_t _darwin_mach_port_name_t; / Used by mach _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:70:9: error:
unknown type name '__uint16_t'
typedef __uint16_t _darwin_mode_t; / [???] Some file attributes _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:71:9: error:
unknown type name '__int64_t'
typedef __int64_t _darwin_off_t; / [???] Used for file sizes _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:72:9: error:
unknown type name '__int32_t'
typedef __int32_t _darwin_pid_t; / [???] process and group IDs _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:73:9: error:
unknown type name '__uint32_t'
typedef __uint32_t _darwin_sigset_t; / [???] signal set _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:74:9: error:
unknown type name '__int32_t'
typedef __int32_t _darwin_suseconds_t; / [???] microseconds _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:75:9: error:
unknown type name '__uint32_t'
typedef __uint32_t _darwin_uid_t; / [???] user IDs _/
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types.h:76:9: error:
unknown type name '__uint32_t'
typedef __uint32_t _darwin_useconds_t; / [???] microseconds _/
^
In file included from ../src/main.cc:5:
In file included from /.../.node-gyp/4.4.4/include/node/node.h:42:
In file included from /.../.node-gyp/4.4.4/include/node/v8.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include/stdint.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/stdint.h:53:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types/_intptr_t.h:30:9: error:
unknown type name '__darwin_intptr_t'
typedef __darwin_intptr_t intptr_t;
^
In file included from ../src/main.cc:5:
In file included from /.../.node-gyp/4.4.4/include/node/node.h:42:
In file included from /.../.node-gyp/4.4.4/include/node/v8.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/stdio.h:67:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/_types.h:42:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_wctype_t;
^
In file included from ../src/main.cc:5:
In file included from /.../.node-gyp/4.4.4/include/node/node.h:42:
In file included from /.../.node-gyp/4.4.4/include/node/v8.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/stdio.h:71:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/_types/va_list.h:31:9: error:
unknown type name '__darwin_va_list'; did you mean '__builtin_va_list'?
typedef __darwin_va_list va_list;
^
note: '__builtin_va_list' declared here
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: ** [Release/obj.target/bsdiff/src/main.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /.../node_modules/react-native-update/node_modules/node-bsdiff
gyp ERR! node -v v4.4.4
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.4.4","npm":"2.15.1"})
npm WARN deprecated [email protected]: This package has been discontinued in favor of lodash@^4.0.0.
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "react-native-update"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-bsdiff package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-bsdiff
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls node-bsdiff
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /.../npm-debug.log
$pushy bundle --platform ios
Bundling with React Native version: 0.31.0
bundle is not a function
你好,我每次运行上面这个命令都失败,报错如下,请问是什么原因?该怎么解决?
D:\ASProject\phonebird\trunk\phonebird>npm config set registry https://registry.
npm.taobao.org --global
D:\ASProject\phonebird\trunk\phonebird>npm config set disturl https://npm.taobao
.org/dist --global
D:\ASProject\phonebird\trunk\phonebird>npm install --save react-native-update
[email protected] install D:\ASProject\phonebird\trunk\phonebird\node_modules
node-bsdiff
node-gyp rebuild
D:\ASProject\phonebird\trunk\phonebird\node_modules\node-bsdiff>if not defined n
pm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-
bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebui
ld )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
main.cc
..\src\main.cc(111): warning C4267: “=”: 从“size_t”转换到“unsigned int”,
可能丢失数据 [D:
ASProject\phonebird\trunk\phonebird\node_modules\node-bsdiff\build\bsdiff.vcxpr
oj]
bsdiff.c
bzlib.c
compress.c
crctable.c
randtable.c
..\src\bzlib\compress.c(205): warning C4244: “=”: 从“__int64”转换到“Int32”
,可能丢失数据 [
D:\ASProject\phonebird\trunk\phonebird\node_modules\node-bsdiff\build\bsdiff.vc
xproj]
blocksort.c
huffman.c
decompress.c
win_delay_load_hook.c
C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_lo
ad_hook.c(34): error C2373: “__pfnDliNotifyHook2”: 重定义;不同的类型修饰符 [D
:\ASProject\p
honebird\trunk\phonebird\node_modules\node-bsdiff\build\bsdiff.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134
): note: 参见“__pfnDliNotifyHook2”的声明
gyp ERR! build error
gyp ERR! stack Error:C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:204:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\ASProject\phonebird\trunk\phonebird\node_modules\node-bsdiff
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "install" "--save" "react-native-update"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-bsdiff package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-bsdiff
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-bsdiff
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\ASProject\phonebird\trunk\phonebird\npm-debug.log
装了react-native-update 但是在当前项目下打
pushy login
没有找到命令
-bash: pushy: command not found
安卓,应用管理强制关闭应用就回滚了,是因为markSuccess()没有成功吗?
componentDidMount() {
this.addEventListenerBack()
this.getPosition()
//更新
this.checkUpdate()
if (isFirstTime) {
markSuccess()
} else if (isRolledBack) {
Alert.alert('提示', '刚刚更新失败了,版本被回滚.');
}
}
你好,我想问一下有关ios差异包的问题,为什么我的差异包合并就会失败,你的做什么处理了吗
运行bundle命令时报错Unexpected token )
。
另据称和node 6也有兼容问题
详细错误提示:
D:\app-develop\kdys-web\employeesmanager\node_modules\react-native-update\android\src\main\jni\DownloadTask.c:107:1 : opening dependency file D:\app-develop\kdys-web\employeesmanager\node_modules\react-native-update\android\build\intermediates\ndk\release\obj/local/armeabi-v7a/objs/rnupdate/D_\app-develop\kdys-web\employeesmanager\node_modules\react-native-update\android\src\main\jni\DownloadTask.o.d: No such file or directory Unknown source file : compilation terminated. Unknown source file : make.exe: *** [D:\app-develop\kdys-web\employeesmanager\node_modules\react-native-update\android\build\intermediates\ndk\release\obj/local/armeabi-v7a/objs/rnupdate/D_\app-develop\kdys-web\employeesmanager\node_modules\react-native-update\android\src\main\jni\DownloadTask.o] Error 1
请问这个热更怎么迁移到swift项目
downloadUpdate(info).then(hash => {
...
}).catch(err => {
Alert.alert('提示', '更新失败');
});
下载更新成功,点击重新启动应用,应用卡死。退出应用,再次进入是更新成功后的包
Undefined symbols for architecture x86_64:
"_BZ2_bzRead", referenced from:
_bz2_read in libRCTHotUpdate.a(bspatch.o)
"_BZ2_bzReadClose", referenced from:
_beginPatch in libRCTHotUpdate.a(bspatch.o)
"_BZ2_bzReadOpen", referenced from:
_beginPatch in libRCTHotUpdate.a(bspatch.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
请问如何解决
你好,
说明文档里面提到:“因为React Native调整了okhttp的依赖,对于0.27以上版本的React Native,请安装1.1.x版本,对于0.26及以前版本,请安装1.0.x版本。”
我在package.json里面写1.0.5仍然下载了1.1.2版本,请问如何下载到1.0.x的版本?
谢谢!
xcode8 编译出来的app在ios 8下闪退,具体报错代码是
[session downloadTaskWithURL:url];
在执行下载热更新的时候。
checkUpdate方法抛异
checkUpdate(appKey).then(info => {
if (info.expired) {
……
} else if (info.upToDate) {
……
} else {
……
}
}).catch(err => {
//直接就到这里了,异常是 network request failed网络请求失败
});
我查看了一下升级包大小和内容,发现并没有介绍说的超小更新包,我只是修改了一个数字而已,结果更新包要150k。
请问是如何生成一个超小更新包?
目前策略:
期望策略:
ios 执行命令 老报错咋办
npm ERR! Error: EACCES: permission denied, open '/Users/huabinhu/.npm/_locks/staging-5dedf5e59c012c8f.lock'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, open '/Users/huabinhu/.npm/_locks/staging-5dedf5e59c012c8f.lock'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: '/Users/huabinhu/.npm/_locks/staging-5dedf5e59c012c8f.lock' }
请问pushy diff怎么使用
pushy diff origin-path next-path --output output-path
通过上面的格式出错,出现信息:
/Users/git/Documents/react-native/RNDF/node_modules/yazl/index.js:350
metadataPath = metadataPath.replace(//g, "/");
^
TypeError: Cannot read property 'replace' of null
at validateMetadataPath (/.../node_modules/yazl/index.js:350:30)
如题,有人知道吗?谢谢!
还有import cn.reactnative.modules.update.UpdateContext;
这个导包导不进来是为啥呢,前面的步骤都没有问题。
Bundling with React Native version: 0.33.0
AssertionError: missing path
at Module.require (module.js:481:3)
at require (internal/module.js:20:19)
at Object.get (/Users/joshua/dn/dn_react/node_modules/react-native/local-cli/util/Config.js:39:20)
at Object. (/Users/joshua/dn/dn_react/node_modules/react-native-update/local-cli/lib/bundle.js:430:36)
at undefined.next (native)
at step (/Users/joshua/dn/dn_react/node_modules/react-native-update/local-cli/lib/bundle.js:44:191)
at /Users/joshua/dn/dn_react/node_modules/react-native-update/local-cli/lib/bundle.js:44:368
pushy login
{ [Error: Cannot find module './build/Release/bsdiff'] code: 'MODULE_NOT_FOUND' }
module.js:327
throw err;
"react-native": "0.31.0", "react-native-update": "^3.0.1"
系统版本 8.1(12B411)
报错信息 为
dyld: Symbol not found: _NSDictionary0
查找问题添加 CoreFoundation.framework 并修改 link CoreFoundation.framework 为option
依旧报错 RCTHotUpdate.m
NSMutableDictionary *ret = [@{} mutableCopy]; EXC_BAD_ACCESS
i6就没事 就 i5s报错
pushy update --platform <ios|android> 使用这个选择相应打包的版本,用iTunes 安装的ipa 文件并不能看到修改后的一行文字。react-native 版本是0.33
#if DEBUG
// 原来的jsCodeLocation
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
#else
jsCodeLocation=[RCTHotUpdate bundleURL];
#endif
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; //注释 的此段代码需要注释么
是否 需要写成
// 原来的jsCodeLocation
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
#else
jsCodeLocation=[RCTHotUpdate bundleURL];
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
510 verbose stack Error: [email protected] install: node-gyp rebuild
510 verbose stack Exit status 1
510 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
510 verbose stack at emitTwo (events.js:100:13)
510 verbose stack at EventEmitter.emit (events.js:185:7)
510 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
510 verbose stack at emitTwo (events.js:100:13)
510 verbose stack at ChildProcess.emit (events.js:185:7)
510 verbose stack at maybeClose (internal/child_process.js:850:16)
510 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
511 verbose pkgid [email protected]
512 verbose cwd /Users/wuyupei/Desktop/medicine
513 error Darwin 15.3.0
514 error argv "/usr/local/Cellar/node/5.8.0/bin/node" "/usr/local/bin/npm" "install" "--save" "react-native-update"
515 error node v5.8.0
516 error npm v3.7.3
517 error code ELIFECYCLE
518 error [email protected] install: node-gyp rebuild
518 error Exit status 1
519 error Failed at the [email protected] install script 'node-gyp rebuild'.
519 error Make sure you have the latest version of node.js and npm installed.
519 error If you do, this is most likely a problem with the node-bsdiff package,
519 error not with npm itself.
519 error Tell the author that this fails on your system:
519 error node-gyp rebuild
519 error You can get information on how to open an issue for this project with:
519 error npm bugs node-bsdiff
519 error Or if that isn't available, you can get their info via:
519 error npm owner ls node-bsdiff
519 error There is likely additional logging output above.
520 verbose exit [ 1, true ]
只要引用了
import {
currentVersion,
} from 'react-native-update';
就会报错
MainActivity:
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
protected String getJSBundleFile() {
return UpdateContext.getBundleUrl(this);
}
@Override
protected String getMainComponentName() {
return "GodatripTools";
}
}
MainApplication:
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@OverRide
protected String getJSBundleFile() {
return UpdateContext.getBundleUrl(MainApplication.this);
}
@OverRide
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
, new VectorIconsPackage()
);
}
};
@OverRide
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
}
bash_profile:
export PATH=${PATH}:/Users/doubleruis/Downloads/android-ndk-r13
A_NDK_ROOT=/Users/doubleruis/Downloads/android-ndk-r13
export A_NDK_ROOT
local.properties:
sdk.dir=/Users/doubleruis/Library/Android/sdk
ndk.dir=/Users/doubleruis/Downloads/android-ndk-r13
结果还是报错:NDK not configured
你好,问一下,我按照教程把代码复制运行,为什么打印(isFirstTime,isRolledBack)的是undefined ,是因为我的debug 模式吗?
我已经执行过了,在web上也出现了版本1.0了。我下次修改代码生成了新的release.apk文件放到服务器上,还需要执行puloadApk吗?
第二次执行出现了错误了。
Error: Validation error
at D:\Work\GitHub\Tuorui\node_modules\react-native-update\local-cli\lib\api.js:77:27
at next (native)
at step (D:\Work\GitHub\Tuorui\node_modules\react-native-update\local-cli\lib\api.js:19:191)
at D:\Work\GitHub\Tuorui\node_modules\react-native-update\local-cli\lib\api.js:19:368
at process._tickCallback (internal/process/next_tick.js:103:7)
更改apk版本号,上传apk还是1.0,而且不删除原本的apk会体会valilation error,但是IPA就不会出现这个问题
特定的时候(如误操作等等)可能会需要解除包的绑定版本,此时应有如下体验:
1、如用户未更新过,此时检测时应提示已经更新到最新
2、如果用户已经更新过,此时检测时应提示可以更新,此时无需下载更新,直接切换到包版本。
问题描述:
比如现在我有一个apk 1.0.0
对应渠道 index ----》 android.xml -> channelId='index'
index2 ----》 android.xml -> channelId='index2'
这会热更新如果一推 那么 则有其中一个渠道包 一直提示更新
这个怎么解决
错误如下,cn/reactnative/modules/update/UpdateModule.java
128行:
JSBundleLoader loader = JSBundleLoader.createFileLoader(application, UpdateContext.getBundleUrl(application));
0.34版本中,JSBundleLoader的createFileLoader方法只接受一个参数,而不是两个,编译报错。
FAILURE: Build failed with an exception.
NDK not configured.
Download the NDK from http://developer.android.com/tools/sdk/ndk/.Then add ndk.dir=path/to/ndk in local.properties.
(On Windows, make sure you escape backslashes, e.g. C:\ndk rather than C:\ndk)
BUILD FAILED
更新过程应当可以被取消。
Error:Execution failed for task ':react-native-update:compileReleaseNdk'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\android-sdk\ndk-bundle\ndk-build.cmd'' finished with non-zero exit value 2
我使用 react-native run-android 运行程序,结果报如上的错误。应该要怎么解决?
``
:react-native-update:compileReleaseJavaWithJavac
D:\Work\GitHub\Tuorui\node_modules\react-native-update\android\src\main\java\cn\reactnative\modules\update\UpdateModule.java:128: 错误: 无法将类 JSBundleLoader 中的方法 createFileLoader应用到给定类型;
JSBundleLoader loader = JSBundleLoader.createFileLoader(application, UpdateContext.getBundleUrl(application));
^
需要: String
找到: Application,String
原因: 实际参数列表和形式参数列表长度不同
1 个错误
:react-native-update:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-update:compileReleaseJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
``
我有部分js css 代码作为静态资源包的方式出现 能使用你们的DIFF 服务 实现最小化 同步更新吗? 或者 你们的diff 服务 有开源吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.