Execution failed for Task ‘assembleDevlopment’ not found in project ':app'

Before posting your question, make sure you’ve read the documentation for both EAS Build & Submit.

In your post, please share:

  • managed workflow
  • EAS-CLI: 2.2.1
  • EXPO SDK: 46

when i use the command to build the app locally i got this error message:

I use the command: npx expo run:android --variant devlopment

FAILURE: Build failed with an exception.

  • What went wrong:
    Task ‘assembleDevlopment’ not found in project ‘:app’.

the print of my screen:

My app works well with the command: npx expo start

it’d be helpful to share the full build log output

Is it possible you have a typo in eas.json? Is that not supposed to be “assembleDevelopment”?

my eas.json file looks like this:

Ah, I see this is the problem. You have a typo in the variant name above.

sorry for the delay
I realize misspelled word but i fixed and i still got the same error
I try build the app using the eas-cli and got this error:
[stderr] Execution failed for task ':app:checkDebugDuplicateClasses'.
For some reason the eas-cli works in the IOS

Please post the whole error message and a link to the build page (so that an Expo team member is able to check the logs there if they decide to. I can’t check your build page.)

the link to my build page:

and the error message when i try run the command eas build --profile development --platform android:

[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:checkDebugDuplicateClasses'.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
[stderr]    > Duplicate class org.bouncycastle.LICENSE found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1ApplicationSpecific found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1ApplicationSpecificParser found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1BitString found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Boolean found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Choice found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Encodable found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1EncodableVector found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Encoding found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Enumerated found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Exception found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1External found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1GeneralizedTime found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Generator found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1InputStream found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Integer found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Null found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)
[stderr]      Duplicate class org.bouncycastle.asn1.ASN1Object found in modules jetified-bcprov-jdk15on-1.65 (org.bouncycastle:bcprov-jdk15on:1.65) and jetified-bcprov-jdk15to18-1.70 (org.bouncycastle:bcprov-jdk15to18:1.70)

I post, thank you for the help

It looks like you have two different versions of bouncy castle in your app.

What are the dependencies and devDependencies in your package.json?
Do you have any "plugins" in app.json?

Also, You say you run npx expo run:android .... Do you have android in .gitignore? Or do you remove the android directory periodically? Or do you run npx expo prebuild --clean periodically?

that is my dependencies:

{
  "name": ""
  "version": "1.0.0",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@gorhom/bottom-sheet": "^4.4.5",
    "@ptomasroos/react-native-multi-slider": "^2.2.2",
    "@react-native-async-storage/async-storage": "^1.17.10",
    "@react-native-community/datetimepicker": "6.2.0",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/drawer": "^6.5.0",
    "@react-navigation/elements": "^1.3.6",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/stack": "^6.3.1",
    "@sentry/react-native": "4.2.2",
    "axios": "^0.27.2",
    "date-fns": "^2.29.3",
    "expo": "~46.0.13",
    "expo-apple-authentication": "^4.3.0",
    "expo-application": "~4.2.2",
    "expo-camera": "^12.3.0",
    "expo-constants": "~13.2.4",
    "expo-contacts": "^10.3.0",
    "expo-dev-client": "~1.3.0",
    "expo-device": "~4.3.0",
    "expo-facebook": "^12.2.0",
    "expo-image-picker": "^13.3.1",
    "expo-intent-launcher": "^10.3.0",
    "expo-linear-gradient": "~11.4.0",
    "expo-linking": "^3.2.2",
    "expo-notifications": "~0.16.1",
    "expo-sharing": "~10.3.0",
    "expo-splash-screen": "~0.16.2",
    "expo-status-bar": "~1.4.0",
    "expo-tracking-transparency": "~2.3.1",
    "expo-updates": "~0.14.6",
    "prop-types": "^15.8.1",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.6",
    "react-native-calendars": "^1.1289.0",
    "react-native-elements": "^3.4.2",
    "react-native-fbsdk-next": "^11.0.0",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-masked-text": "^1.13.0",
    "react-native-modal": "^13.0.1",
    "react-native-modal-datetime-picker": "^14.0.0",
    "react-native-paper": "^4.12.5",
    "react-native-reanimated": "~2.9.1",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-touchable-scale": "^2.2.0",
    "react-native-web": "~0.18.7",
    "react-native-webview": "11.23.0",
    "react-redux": "^8.0.4",
    "redux": "^4.2.0",
    "redux-devtools-extension": "^2.13.9",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.4.1",
    "sentry-expo": "~5.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/eslint-parser": "^7.19.1",
    "eslint": "^8.24.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-config-prettier": "^8.5.0",
    "eslint-import-resolver-babel-module": "^5.3.1",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-jsx-a11y": "^6.6.1",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-react": "^7.31.8",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-react-native": "^4.0.0",
    "prettier": "^2.7.1"
  },
  "private": true
}

the plugins i am using are these:

    "plugins": [
      "sentry-expo",
      "expo-tracking-transparency",
      [
        "react-native-fbsdk-next",
        {
          "appID": "appID",
          "clientToken": "clientToken",
          "displayName": "displayName",
          "advertiserIDCollectionEnabled": false,
          "autoLogAppEventsEnabled": true,
          "isAutoInitEnabled": true
        }
      ]
    ],

About npx expo run:android I don’t run them periodically, I just start using them after the team updates the expo to version 46, I never run npx expo prebuild --clean

Hi @ytalokaio

expo-facebook was deprecated and it was removed in Expo SDK 46.

https://docs.expo.dev/versions/v45.0.0/sdk/facebook/

Deprecated. This module will be removed in SDK 46. There will be no replacement that works with the classic build service (expo build) because the classic build service has been superseded by EAS Build. With EAS Build and Development Builds, you should use react-native-fbsdk-next instead.

So as mentioned above, you will need to move to react-native-fbsdk-next.

See if that fixes it.

I found the problem that stopped the build from happening, was the react-native-fbsdk-next package.
For some reason when I use it I can’t build the app, maybe I did something wrong
I’ll look deeper for the reason

UPDATE

The reson of the error was the version of the react-native-fbsdk-next package.
before i was using the react-native-fbsdk-next: 11.0.0, now I am using the react-native-fbsdk-next: 10.1.0

@wodin thanks for the help

1 Like

I confirm it.
For me, having react-native-fbsdk-next along with expo-updates will make the app (built by EAS) crashed. Do you get the same?

@ytalokaio was getting build errors. They didn’t say anything about errors with expo-updates.

You should probably post a new thread with the details of the crash and ideally a link to a repo with a minimal example app that crashes like this.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.