EXPO SDK 46 React Native Android EAS构建失败求助
Expo SDK 46 Android构建失败求助
问题概述
使用Expo SDK 46执行eas build --platform android命令构建React Native应用时持续失败,已尝试3个月仍无法完成Play Store版本构建,寻求技术支持。
环境与依赖配置
核心环境
- Expo SDK: 46.0.0
- React Native: 0.69.6
- React: 18.0.0
- 构建命令:
eas build --platform android
完整依赖配置
"dependencies": { "@amplitude/analytics-react-native": "^0.5.1", "@expo-google-fonts/inter": "^0.1.0", "@expo-google-fonts/judson": "^0.1.0", "@expo-google-fonts/montserrat": "^0.1.0", "@expo-google-fonts/noto-sans": "^0.1.0", "@expo-google-fonts/open-sans": "^0.1.0", "@nlazzos/react-native-skeleton": "^1.0.3", "@react-native-async-storage/async-storage": "~1.17.3", "@react-native-community/datetimepicker": "6.2.0", "@react-native-community/netinfo": "9.3.0", "@react-native-community/slider": "4.2.3", "@react-native-masked-view/masked-view": "0.2.7", "@react-navigation/bottom-tabs": "^6.0.9", "@react-navigation/drawer": "^6.1.8", "@react-navigation/material-top-tabs": "^6.0.6", "@react-navigation/native": "^6.0.6", "@react-navigation/stack": "^6.0.11", "buffer": "^6.0.3", "dotenv": "^16.0.1", "expo": "^46.0.0", "expo-analytics": "^1.0.16", "expo-application": "~4.2.2", "expo-av": "~12.0.4", "expo-barcode-scanner": "~11.4.0", "expo-camera": "~12.4.0", "expo-clipboard": "~3.1.0", "expo-constants": "~13.2.4", "expo-crypto": "~11.0.0", "expo-dev-client": "~1.3.1", "expo-document-picker": "~10.3.0", "expo-file-system": "~14.1.0", "expo-font": "~10.2.0", "expo-image-picker": "~13.3.1", "expo-linear-gradient": "~11.4.0", "expo-linking": "~3.2.4", "expo-location": "~14.3.0", "expo-media-library": "~14.2.0", "expo-network": "~4.3.0", "expo-notifications": "~0.16.1", "expo-screen-capture": "~4.3.0", "expo-screen-orientation": "~4.3.0", "expo-secure-store": "~11.3.0", "expo-status-bar": "~1.4.0", "expo-store-review": "~5.3.0", "expo-tracking-transparency": "~2.3.1", "expo-updates": "~0.14.7", "expo-web-browser": "~11.0.0", "lottie-react-native": "5.1.3", "moment": "^2.27.0", "numeral": "^2.0.6", "react": "18.0.0", "react-native": "0.69.6", "react-native-base64": "0.0.2", "react-native-calendars": "^1.1275.0", "react-native-chart-kit": "^6.3.0", "react-native-cn-richtext-editor": "^1.0.40", "react-native-collapsible": "^1.5.3", "react-native-copilot": "^2.5.1", "react-native-crypto-js": "^1.0.0", "react-native-date-picker": "^4.1.3", "react-native-elements": "^3.4.2", "react-native-fetch-polyfill": "^1.1.3", "react-native-gesture-handler": "~2.5.0", "react-native-hyperlink": "0.0.19", "react-native-image-slider-banner": "^1.0.3", "react-native-image-viewing": "^0.2.0", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-maps": "0.31.1", "react-native-modal": "^11.5.6", "react-native-multiple-select": "^0.5.3", "react-native-otp-textinput": "0.0.5", "react-native-pager-view": "5.4.24", "react-native-pose": "^0.9.0", "react-native-progress": "^4.1.2", "react-native-qrcode-generator": "^1.2.2", "react-native-qrcode-svg": "^5.2.0", "react-native-ratings": "^7.3.0", "react-native-reanimated": "~2.9.1", "react-native-render-html": "^4.2.2", "react-native-safe-area-context": "4.3.1", "react-native-safe-area-view": "^1.1.1", "react-native-scalable-image": "^1.1.0", "react-native-screens": "~3.15.0", "react-native-scroll-into-view": "^1.0.3", "react-native-skeleton-content": "^1.0.22", "react-native-svg": "12.3.0", "react-native-swipe-list-view": "^3.2.3", "react-native-tab-view": "^3.1.1", "react-native-vector-icons": "^9.0.0", "react-native-webview": "11.23.0", "react-navigation": "^3.11.1", "react-navigation-drawer": "^2.5.0", "react-navigation-stack": "^2.8.2", "react-redux": "^5.1.1", "redux": "^4.0.1", "redux-persist": "^5.10.0", "rn-swipe-button": "^1.2.8", "url-parse": "^1.4.7" }, "devDependencies": { "@babel/core": "^7.12.9", "@expo/vector-icons": "^12.0.0", "babel-eslint": "^10.1.0", "eslint": "^5.9.0", "eslint-plugin-react": "^7.20.4", "react-native-dotenv": "^3.3.1" }
排查建议
- 移除导航库版本冲突:项目同时存在
@react-navigation/native(v6)和旧版react-navigation(v3),这是典型的依赖冲突源,直接导致构建异常。需删除所有v3版本的导航包(react-navigation、react-navigation-drawer、react-navigation-stack),仅保留v6系列的导航依赖。 - 验证第三方依赖兼容性:检查
react-native-cn-richtext-editor、react-native-pose等第三方库是否适配RN 0.69和Expo SDK 46,对未及时更新的库尝试升级或替换为兼容替代方案。 - 定位核心错误日志:从构建日志末尾提取关键错误信息(如gradle编译失败、依赖解析错误、资源重复定义等),这是定位问题的核心依据。
- 清理构建缓存:执行
eas build --clear-cache后重新启动构建,避免缓存残留导致的异常。 - 检查eas.json配置:确认
eas.json中Android构建的签名配置、gradle版本、构建参数等是否符合Expo SDK 46的要求。
内容的提问来源于stack exchange,提问作者Imanuel Victory
相关产品推荐
相关产品推荐

