我正在使用 expo 50,“expo-updates”:~0.24.12,Hermes 引擎。
我很确定这不是配置问题。我查了一下:
在检查logcat时,我发现这些日志表明更新已成功下载,但没有生效:
{"timestamp":1714912838139,"message":"Updates state change: CheckCompleteAvailable, context = {isUpdateAvailable=true, isUpdatePending=false, isChecking=false, isDownloading=false, isRestarting=false,
{"timestamp":1714912838140,"message":"Updates state change: Download, context = {isUpdateAvailable=true, isUpdatePending=false, isChecking=false, isDownloading=true, isRestarting=false,
{"timestamp":1714912838153,"message":"UpdatesController onBackgroundUpdateFinished: Update available","code":"None","level":"info"}
{"timestamp":1714912838155,"message":"Updates state change: DownloadComplete, context = {isUpdateAvailable=true, isUpdatePending=true, isChecking=false, isDownloading=false, isRestarting=false
{"timestamp":1714912838156,"message":"ErrorRecovery: remote load status changed: NEW_UPDATE_LOADED","code":"None","level":"info"}
{"timestamp":1714912838288,"message":"Emitted event: name = Expo.nativeUpdatesStateChangeEvent, type = check","code":"None","level":"info"}
{"timestamp":1714912838289,"message":"Emitted event: name = Expo.nativeUpdatesStateChangeEvent, type = checkCompleteAvailable","code":"None","level":"info"}
{"timestamp":1714912838290,"message":"Emitted event: name = Expo.nativeUpdatesStateChangeEvent, type = download","code":"None","level":"info"}
{"timestamp":1714912838290,"message":"Emitted event: name = Expo.nativeUpdatesEvent, type = updateAvailable","code":"None","level":"info"}
{"timestamp":1714912838290,"message":"Emitted event: name = Expo.nativeUpdatesStateChangeEvent, type = downloadComplete","code":"None","level":"info"}
我已遵循基本和高级故障排除文档,但无济于事。
我的app.json有这个配置:
"updates": {
"fallbackToCacheTimeout": 0,
"enabled": true,
"requestHeaders": {
"expo-channel-name": "preview" -- set a specific channel for a local debug build
},
"url": "https://u.expo.dev/<my-id>"
},
关于此事有任何更新吗?
我尝试添加这个:
runtimeVersion: {
policy: 'appVersion',
},
致我的
app.config.js
,现在正在等待构建。我在某处读到,在更改后它应该可以工作,如果可以的话,我会更新这个答案。