mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-08 07:28:37 +08:00
fix:expo-updates 包会在 expo prebuild 阶段向 Android 项目注入与 EAS Update 相关的 Gradle 任务,导致 assembleRelease 时卡住(挂起不退出)
This commit is contained in:
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -58,6 +58,8 @@ jobs:
|
|||||||
run: chmod +x android/gradlew
|
run: chmod +x android/gradlew
|
||||||
|
|
||||||
- name: Build Release APK
|
- name: Build Release APK
|
||||||
|
env:
|
||||||
|
SENTRY_DISABLE_AUTO_UPLOAD: 'true'
|
||||||
run: |
|
run: |
|
||||||
cd android
|
cd android
|
||||||
./gradlew assembleRelease --no-daemon
|
./gradlew assembleRelease --no-daemon
|
||||||
|
|||||||
13
app.json
13
app.json
@@ -41,21 +41,12 @@
|
|||||||
"expo-router",
|
"expo-router",
|
||||||
"react-native-video",
|
"react-native-video",
|
||||||
"expo-screen-orientation",
|
"expo-screen-orientation",
|
||||||
"expo-updates",
|
"@sentry/react-native/expo"
|
||||||
"@sentry/react-native/expo"
|
|
||||||
],
|
],
|
||||||
"experiments": {
|
"experiments": {
|
||||||
"typedRoutes": true
|
"typedRoutes": true
|
||||||
},
|
},
|
||||||
"runtimeVersion": {
|
"extra": {
|
||||||
"policy": "appVersion"
|
|
||||||
},
|
|
||||||
"updates": {
|
|
||||||
"url": "https://u.expo.dev/eac4192a-ae80-461c-8fff-6e1a8b777bd1",
|
|
||||||
"checkAutomatically": "ON_LOAD",
|
|
||||||
"fallbackToCacheTimeout": 0
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"router": {},
|
"router": {},
|
||||||
"eas": {
|
"eas": {
|
||||||
"projectId": "eac4192a-ae80-461c-8fff-6e1a8b777bd1"
|
"projectId": "eac4192a-ae80-461c-8fff-6e1a8b777bd1"
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { useAuthStore } from '../store/authStore';
|
|||||||
import { useDownloadStore } from '../store/downloadStore';
|
import { useDownloadStore } from '../store/downloadStore';
|
||||||
import { useSettingsStore } from '../store/settingsStore';
|
import { useSettingsStore } from '../store/settingsStore';
|
||||||
import { MiniPlayer } from '../components/MiniPlayer';
|
import { MiniPlayer } from '../components/MiniPlayer';
|
||||||
import * as Updates from 'expo-updates';
|
|
||||||
import * as Sentry from '@sentry/react-native';
|
import * as Sentry from '@sentry/react-native';
|
||||||
import { ErrorBoundary } from '@sentry/react-native';
|
import { ErrorBoundary } from '@sentry/react-native';
|
||||||
|
|
||||||
@@ -28,18 +27,6 @@ function RootLayout() {
|
|||||||
loadDownloads();
|
loadDownloads();
|
||||||
restoreSettings();
|
restoreSettings();
|
||||||
|
|
||||||
const checkOTA = async () => {
|
|
||||||
if (!Updates.isEnabled) return;
|
|
||||||
try {
|
|
||||||
const update = await Updates.checkForUpdateAsync();
|
|
||||||
if (update.isAvailable) {
|
|
||||||
await Updates.fetchUpdateAsync();
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// 静默失败,不影响正常使用
|
|
||||||
}
|
|
||||||
};
|
|
||||||
checkOTA();
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -29,8 +29,7 @@
|
|||||||
"expo-screen-orientation": "~55.0.8",
|
"expo-screen-orientation": "~55.0.8",
|
||||||
"expo-status-bar": "~55.0.4",
|
"expo-status-bar": "~55.0.4",
|
||||||
"expo-system-ui": "~55.0.9",
|
"expo-system-ui": "~55.0.9",
|
||||||
"expo-updates": "~55.0.15",
|
"pako": "^2.1.0",
|
||||||
"pako": "^2.1.0",
|
|
||||||
"react": "19.2.0",
|
"react": "19.2.0",
|
||||||
"react-dom": "19.2.0",
|
"react-dom": "19.2.0",
|
||||||
"react-native": "0.83.2",
|
"react-native": "0.83.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user