Expo未 eject 应用时如何配置<appAuthRedirectScheme>?
Expo Android构建错误:appAuthRedirectScheme未设置的解决方案
不用 eject 应用就能设置这个参数,你之前的配置方向错了——appAuthRedirectScheme是需要单独在app.json的android字段下直接声明的,不是嵌套在intentFilters里。
正确的配置示例:
{ "expo": { "name": "你的应用名称", "slug": "your-app-slug", "android": { "package": "com.limislogger.app", "appAuthRedirectScheme": "com.limislogger.app", "intentFilters": [ { "action": "VIEW", "data": [ { "scheme": "com.limislogger.app" } ], "category": [ "BROWSABLE", "DEFAULT" ] } ] } } }
说明:
appAuthRedirectScheme是Expo提供的专属配置项,会自动同步到Android清单文件,无需手动修改- 这个Scheme值建议和你的Android包名保持一致,也可以使用自定义的合法Scheme格式
- 配置完成后,执行
expo prebuild --clean(预构建项目)或直接重新运行expo build:android,确保配置生效 - 如果之前构建有缓存问题,可先清理Expo缓存再尝试构建
内容的提问来源于stack exchange,提问作者tariktrokic
相关产品推荐
相关产品推荐

