1

This is an error I'm facing...

ERROR..BUILD FAILED

This is my Package.json

{
  "name": "eMembershipCard",
  "version": "0.0.4",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "android_emembershipcard": "react-native run-android --variant=emembershipcardDebug  --appIdSuffix = 'membershipdemo' ",
    "android_omaha": "react-native run-android --variant=omahaDebug  --appIdSuffix = 'ocm' ",
    "android_magichouse": "react-native run-android --variant=magichouseDebug  --appIdSuffix = 'magichouse' ",
    "ios_emembershipcard": "react-native run-ios --scheme eMembershipCard --configuration eMembershipCard",
    "ios_omaha": "react-native run-ios --scheme omaha --configuration omaha",
    "ios_magichouse": "react-native run-ios --scheme magichouse --configuration magichouse",
    "emembership-build": "cd android && ./gradlew assembleemembershipcardRelease",
    "emembership-build-debug": "cd android && ./gradlew assembleemembershipcardDebug",
    "omaha-build-debug": "cd android && ./gradlew assembleomahaDebug",
    "magichouse-build-debug": "cd android && ./gradlew assemblemagichouseDebug",
    "emembership-build-debug-bundle": "cd android && ./gradlew bundleemembershipcardDebug",
    "omaha-build-debug-bundle": "cd android && ./gradlew bundleomahaDebug",
    "magichouse-build-debug-bundle": "cd android && ./gradlew bundlemagichouseDebug"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.16.0",
    "@react-native-community/clipboard": "^1.5.1",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "^7.1.5",
    "@react-native-firebase/app": "^14.12.0",
    "@react-native-firebase/messaging": "^14.2.2",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "android": "^0.0.8",
    "axios": "^0.24.0",
    "linkify-html": "^3.0.5",
    "moment": "^2.29.1",
    "react": "17.0.2",
    "react-native": "0.66.4",
    "react-native-barcode-builder": "^2.0.0",
    "react-native-camera": "^4.2.1",
    "react-native-collapsible": "^1.6.0",
    "react-native-config": "^1.4.11",
    "react-native-dots-pagination": "^0.2.0",
    "react-native-flash-message": "^0.2.0",
    "react-native-floating-action": "^1.22.0",
    "react-native-geolocation-service": "^5.3.0-beta.4",
    "react-native-gesture-handler": "^2.0.0",
    "react-native-gradient-buttons": "^2.0.2",
    "react-native-html-to-pdf": "^0.12.0",
    "react-native-hyperlink": "^0.0.19",
    "react-native-image-pan-zoom": "^2.1.12",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-marquee": "^0.3.2",
    "react-native-material-menu": "^2.0.0",
    "react-native-modal": "^13.0.1",
    "react-native-open-maps": "^0.4.0",
    "react-native-pager-view": "^5.4.9",
    "react-native-permissions": "^3.2.0",
    "react-native-phone-number-input": "^2.1.0",
    "react-native-qrcode-scanner": "^1.5.4",
    "react-native-qrcode-svg": "^6.1.2",
    "react-native-reanimated": "^2.2.4",
    "react-native-render-html": "^6.3.1",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.10.0",
    "react-native-share": "^7.3.5",
    "react-native-splash-screen": "^3.3.0",
    "react-native-sqlite-storage": "^6.0.1",
    "react-native-svg": "^12.1.1",
    "react-native-unimodules": "^0.14.10",
    "react-native-uuid": "^2.0.1",
    "react-native-viewpager": "^0.2.13",
    "react-native-wallet": "^1.0.8",
    "react-native-webview": "^11.15.0",
    "rn-fetch-blob": "^0.12.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "7.14.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.66.2",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  }
}

What I have tried...

  1. I think the commands which is necessary to solve the error I almost tried to solve...
  2. And also I have set the environment setup very properly as the react native setup docs says ...
  3. I have updated gradle version , kotlin version, react native version , npm version , node version etc...
  4. I have also updated Firebase app , Firebase message and Firebase.. where Firebase app and messages version should be same...
  5. I have also set up the SDK TOOLS, Android SDK in Android studio ...
  6. I have uninstalled the nodes, vs code and again reinstalled it but again facing the same issue i.e. Build Failed....

Here is my android/build.gradle

buildscript {
ext {
    buildToolsVersion = "30.0.2"
    minSdkVersion = 21
    compileSdkVersion = 29
    targetSdkVersion = 31
    ndkVersion = "21.4.7075529"
    kotlin_version = '1.7.0'
}
repositories {
    google()
    mavenCentral()
}
dependencies {
    classpath("com.android.tools.build:gradle:4.2.2")
    classpath 'com.google.gms:google-services:4.3.10'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0"

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects { repositories {

    mavenCentral()
    mavenLocal()
    maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url("$rootDir/../node_modules/react-native/android")
    }
    maven {
        // Android JSC is installed from npm
        url("$rootDir/../node_modules/jsc-android/dist")
    }

    google()
    maven { url 'https://www.jitpack.io' }
}

}

In app/build.gradle already passes key under signing configs...

 signingConfigs {
    debug {
        storeFile file('AppsDNA_production.keystore')
        storePassword 'inficare@123'
        keyAlias 'appsdna'
        keyPassword 'inficare@123'
    }
    release {
        storeFile file('AppsDNA_production.keystore')
        storePassword 'inficare@123'
        keyAlias 'appsdna'
        keyPassword 'inficare@123'
    }
}

PS D:\ememberProject\eMembership-React-Native> npm version
{ eMembershipCard: '0.0.4', npm: '9.1.3', node: '19.1.0', v8: '10.7.193.20-node.19', uv: '1.44.2', zlib: '1.2.11', brotli: '1.0.9', ares: '1.18.1', modules: '111', nghttp2: '1.47.0', napi: '8', llhttp: '8.1.0', openssl: '3.0.7+quic', cldr: '42.0', icu: '72.1', tz: '2022e', unicode: '15.0', ngtcp2: '0.8.1', nghttp3: '0.7.0' }

  • Does this answer your question? [React Native Android build failure with different errors without any changes in code for past days due to publish of React Native version 0.71.0-rc.0](https://stackoverflow.com/questions/74334162/react-native-android-build-failure-with-different-errors-without-any-changes-in) – Thanhal P A Dec 12 '22 at 10:01

1 Answers1

-1

try this package version

"react-native-screens": "3.7.2",

Umer Arain
  • 17
  • 2