请教一个 expo 的问题,一直打包报错,找不到原因,感谢感谢!

7 天前
 moment082

目前正在使用 expo 开发一款 APP ,目前我是能在 web 端正常使用的,在手机端测试也是没有问题的,就是打包的时候报错,不知道是什么原因报错,这是我的一些版本信息:

{
  "dependencies": {
    "@babel/runtime": "^7.26.0",
    "@expo/vector-icons": "^14.0.2",
    "@react-native-async-storage/async-storage": "^2.1.0",
    "@react-navigation/bottom-tabs": "^7.0.0",
    "@react-navigation/native": "^7.0.13",
    "@supabase/supabase-js": "^2.46.2",
    "expo": "~52.0.11",
    "expo-blur": "~14.0.1",
    "expo-clipboard": "^7.0.0",
    "expo-constants": "~17.0.3",
    "expo-file-system": "^18.0.4",
    "expo-font": "~13.0.1",
    "expo-haptics": "~14.0.0",
    "expo-image-manipulator": "^13.0.5",
    "expo-image-picker": "^16.0.3",
    "expo-linking": "~7.0.3",
    "expo-media-library": "^17.0.3",
    "expo-router": "~4.0.9",
    "expo-splash-screen": "~0.29.13",
    "expo-status-bar": "~2.0.0",
    "expo-symbols": "~0.2.0",
    "expo-system-ui": "~4.0.4",
    "expo-web-browser": "~14.0.1",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-native": "0.76.3",
    "react-native-element-dropdown": "^2.12.2",
    "react-native-gesture-handler": "~2.20.2",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-markdown-display": "^7.0.2",
    "react-native-popup-menu": "^0.16.1",
    "react-native-reanimated": "~3.16.1",
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "~4.1.0",
    "react-native-web": "~0.19.13",
    "react-native-webview": "13.12.2",
    "twrnc": "^4.6.0",
    "zustand": "^5.0.1"
  }
}

这是 app.json 文件的配置:

{
  "expo": {
    "name": "",
    "slug": "",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "scheme": "myapp",
    "userInterfaceStyle": "automatic",
    "newArchEnabled": true,
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "package": "",
      "permissions": [
        "CAMERA",
        "READ_EXTERNAL_STORAGE",
        "WRITE_EXTERNAL_STORAGE",
        "MEDIA_LIBRARY"
      ]
    },
    "web": {
      "bundler": "metro",
      "output": "static",
      "favicon": "./assets/images/favicon.png"
    },
    "plugins": [
      "expo-router",
      "expo-image-picker",
      "expo-media-library",
      "expo-file-system",
      [
        "expo-splash-screen",
        {
          "image": "./assets/images/splash-icon.png",
          "imageWidth": 200,
          "resizeMode": "contain",
          "backgroundColor": "#ffffff"
        }
      ]
    ],
    "experiments": {
      "typedRoutes": true
    },
    "extra": {
      "router": {
        "origin": false
      },
      "eas": {
        "projectId": "79ae9f3b-3151-485f-bf91-742e4c21e"
      }
    }
  }
}

这是 eas.json 文件的配置:

{
  "cli": {
    "version": ">= 13.4.2",
    "appVersionSource": "remote"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "android": {
        "gradleCommand": ":app:assembleDebug",
        "buildType": "apk"
      }
    },
    "preview": {
      "distribution": "internal",
      "android": {
        "buildType": "apk",
        "gradleCommand": ":app:assembleRelease"
      }
    },
    "production": {
      "autoIncrement": true,
      "android": {
        "buildType": "app-bundle",
        "gradleCommand": ":app:bundleRelease"
      }
    }
  },
  "submit": {
    "production": {
      "android": {
        "track": "internal"
      }
    }
  }
}

这是 eas 的版本:

这是相关的报错信息:

请问这些都应该如何解决啊。感谢大佬们的指教!!!

528 次点击
所在节点    程序员
11 条回复
hefengwqz
7 天前
Java 版本用 23 的
hefengwqz
7 天前
话说 react native 现在国内用 expo 的多,还是原生脚手架的多啊
MarcoJiang
7 天前
试试切换成 JDK17
FreshOldMan
7 天前
@hefengwqz #2 新项目肯定 expo 多,文档都换成 expo 了,老项目基本都是原生脚手架
moment082
7 天前
@MarcoJiang 用的是 17.0.11
moment082
7 天前
@hefengwqz 我的是 17 版本,好像 expo 不依赖 jdk 吧
hefengwqz
7 天前
@moment082 gradle 依赖,你的 8.10.2 太新了,8.10+后官方都维护的 Java23
moment082
7 天前
@hefengwqz 好像还真是,我去升级一下看看
moment082
7 天前
@hefengwqz 还是有这个报错欸 java version "23.0.1" 2024-10-15
Java(TM) SE Runtime Environment (build 23.0.1+11-39)
Java HotSpot(TM) 64-Bit Server VM (build 23.0.1+11-39, mixed mode, sharing) 我已经升级了
hwf
7 天前
梯子挂了吗
moment082
7 天前
@hwf 找到问题了,包管理工具的原因

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1095186

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX