提问者:小点点

任务“: app:checkDebugDuplicateClass”执行失败。反应原生


任务“: app:checkDebugDuplicateClass”执行失败。

我有现有的expo应用程序,它在expo中运行良好,但对于某些要求,我在弹出后将其弹出到react native cli中。我在android中使用npx react-native run-android命令运行它,但它抛出这些错误。

我尝试了gradlew清洁,更改sdkVersion和soo许多解决方案,但没有一个有效。

这是我的包. json

  "name": "mobile-app",
  "version": "1.0.0",
  "main": "__generated__/AppEntry.js",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "clear": "expo r -c",
    "eject": "expo eject",
    "update": "expo update"
  },
  "dependencies": {
    "@firebase/app-types": "0.6.1",
    "@mapbox/polyline": "1.1.1",
    "@react-native-async-storage/async-storage": "1.15.0",
    "@react-native-community/datetimepicker": "3.5.2",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/native": "5.7.5",
    "common": "1.0.0",
    "expo": "^1.0.0",
    "expo-apple-authentication": "3.2.1",
    "expo-asset": "8.3.3",
    "expo-av": "9.2.3",
    "expo-constants": "^13.0.2",
    "expo-crypto": "9.2.0",
    "expo-facebook": "11.3.1",
    "expo-firebase-recaptcha": "1.4.4",
    "expo-font": "9.2.1",
    "expo-image-picker": "10.2.2",
    "expo-localization": "10.2.0",
    "expo-location": "12.1.2",
    "expo-notifications": "^0.14.1",
    "expo-splash-screen": "~0.11.2",
    "expo-status-bar": "~1.0.4",
    "expo-task-manager": "9.2.2",
    "expo-updates": "^0.13.0",
    "firebase": "^8.10.1",
    "i18n-js": "3.8.0",
    "moment": "^2.29.3",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "^0.68.1",
    "react-native-actions-sheet": "0.3.5",
    "react-native-dash": "0.0.11",
    "react-native-elements": "2.3.2",
    "react-native-gesture-handler": "1.10.2",
    "react-native-google-maps-directions": "2.1.1",
    "react-native-google-places-autocomplete": "1.8.0",
    "react-native-maps": "0.28.0",
    "react-native-modal-datetime-picker": "8.7.1",
    "react-native-picker-select": "7.0.0",
    "react-native-reanimated": "2.2.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "3.4.0",
    "react-native-segmented-control-tab": "3.4.1",
    "react-native-simple-radio-button": "2.7.4",
    "react-native-star-rating": "^1.0.8",
    "react-native-unimodules": "^0.15.0",
    "react-native-vector-icons": "7.0.0",
    "react-native-web": "^0.17.7",
    "react-native-webview": "11.6.2",
    "react-navigation": "4.3.7",
    "react-navigation-drawer": "2.7.1",
    "react-navigation-stack": "2.3.11",
    "react-redux": "7.2.0"
  },
  "devDependencies": {
    "@babel/core": "7.9.0",
    "babel-preset-expo": "8.3.0",
    "expo-yarn-workspaces": "1.2.1"
  }
}```

共1个答案

匿名用户

从世博SDK46弹出后,我目前也遇到了同样的情况。我正在从上层目录的Makefile运行命令。

为了让它工作,我只是手动导航到目录:cd./project_root并运行命令。CLI中似乎有些东西不喜欢从项目根目录以外的其他目录运行它。

但我不确定这是否能帮你解决