React Native RL - Eas构建apk错误:不知道哪个android drawable后缀用于资产

9rbhqvlz  于 2023-02-09  发布在  React
关注(0)|答案(1)|浏览(104)

我正在维护RL应用程序,修改代码后,我想用apk构建测试一下。
我将使用eas build -p android --profile preview创建一个APK。(这是我第一次使用Eas Build)。
但是,在生成过程中发生以下错误:

> Task :app:bundleReleaseJsAndAssets FAILED
[stderr] error Don't know which android drawable suffix to use for asset: {"__packager_asset":true,"fileSystemLocation":"/home/expo/workingdir/build/assets/images/navigation/service","httpServerLocation":"/assets/assets/images/navigation/service","width":320,"height":130,"scales":[1,2,3,4,5],"files":["/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1.png","/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1@2x.png","/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1@3x.png","/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1@4x.png","/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1@5x.png"],"hash":"b74c4d596b7a00b174f1cbbf6373edac","name":"reservation_thum_img_1","type":"png","fileHashes":["f8e111b8eadda7d33612a89b3337968d","08bbb315b8db585383bafaf3bbbb159f","b410e37fc8c275c98f2b07711193b9d2","5bc21bf4e96ae2a26d0f1f41a0bb9dc8","f9883a5447a863dde859d547da0c0fe7"]}.
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 3 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
933 actionable tasks: 933 executed
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:bundleReleaseJsAndAssets'.
[stderr] > Process 'command 'node'' finished with non-zero exit value 1
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 12m 49s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

这是我的package.json和eas.json代码

// package.json
{
  "name": "my-app",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject",
    "test": "jest --watchAll"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "resolutions": {},
  "dependencies": {
    "@expo/react-native-action-sheet": "^4.0.1",
    "@expo/samples": "~3.0.3",
    "@expo/vector-icons": "^13.0.0",
    "@fortawesome/fontawesome-svg-core": "^6.2.1",
    "@fortawesome/free-solid-svg-icons": "^6.2.1",
    "@fortawesome/react-native-fontawesome": "^0.3.0",
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-native-community/datetimepicker": "6.1.2",
    "axios": "^1.2.6",
    "crypto-js": "^4.1.1",
    "expo": "^45.0.0",
    "expo-app-loading": "~2.0.0",
    "expo-asset": "~8.5.0",
    "expo-blur": "~11.1.0",
    "expo-camera": "~12.2.0",
    "expo-cli": "^6.2.1",
    "expo-constants": "~13.1.1",
    "expo-file-system": "~14.0.0",
    "expo-font": "~10.1.0",
    "expo-image-manipulator": "~10.3.1",
    "expo-image-picker": "~13.1.1",
    "expo-linking": "~3.1.0",
    "expo-location": "~14.2.2",
    "expo-notifications": "~0.15.4",
    "expo-splash-screen": "^0.15.1",
    "expo-status-bar": "~1.3.0",
    "expo-updates": "~0.13.4",
    "expo-web-browser": "~10.2.1",
    "global": "^4.4.0",
    "immutable": "^4.2.2",
    "intl": "^1.2.5",
    "jwt-decode": "^3.1.2",
    "moment": "^2.29.4",
    "qs": "^6.11.0",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-geocode": "^0.2.3",
    "react-native": "0.68.2",
    "react-native-dash": "^0.0.11",
    "react-native-easy-toast": "^2.3.0",
    "react-native-elements": "^3.4.3",
    "react-native-gesture-handler": "~2.2.1",
    "react-native-image-resizer": "^1.0.1",
    "react-native-maps": "0.30.2",
    "react-native-measureme": "^0.0.2",
    "react-native-modal": "^13.0.1",
    "react-native-modal-datetime-picker": "^14.0.1",
    "react-native-picker-select": "^8.0.4",
    "react-native-push-notification-popup": "^1.6.1",
    "react-native-qrcode": "^0.2.7",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "~3.11.1",
    "react-native-status-bar-height": "^2.6.0",
    "react-native-svg": "12.3.0",
    "react-native-svg-transformer": "^1.0.0",
    "react-native-web": "0.17.7",
    "react-native-webview": "11.18.1",
    "react-navigation": "^3.11.0",
    "react-redux": "^8.0.5",
    "redux": "^4.2.1",
    "redux-actions": "^2.6.5",
    "redux-devtools-extension": "^2.13.8",
    "redux-pender": "^2.0.12",
    "underscore": "^1.13.6"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

// eas.json 
{
  "cli": {
    "version": ">= 3.5.2"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal"
    },
    "production": {
      "android": {
        "buildType": "apk"
      }
    }
  },
  "submit": {
    "production": {}
  }
}

我可以知道这个问题的原因和解决方法吗?
谢谢你。

f2uvfpb9

f2uvfpb91#

我认为这是这个问题的重复。请尝试为这个问题提供的解决方案。问题链接:Detected multiple Kotlin daemon sessions at build\kotlin\sessions - React-Native

相关问题