facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.3k stars 24.35k forks source link

Error:Excution failed for Task :app:compileDebugJavaWithJavac FAILED and gradle issue in react-native setup in my system #38519

Closed manishhedau closed 1 year ago

manishhedau commented 1 year ago

I am trying to setup react-native project in my system and after installing all the dependencies and run command "react-native run-android" getting below error. I have try every possible solution which I could but didn't able to resolve this issue. I am using latest node version and java 11, android studios. Please help me to resolve this issue Thanks in advance


> KissanPay@0.0.1 android 
> react-native run-android

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1389 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
* daemon not running; starting now at tcp:5037
* daemon started successfully
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
D:\code practice\projects\KissanPay-frontend\node_modules\react-native-reanimated\android\react-native-reanimated-67-jsc.aar
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33

This Android Gradle plugin (7.2.1) was tested up to compileSdk = 32

This warning can be suppressed by adding
    android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33

This Android Gradle plugin (7.2.1) was tested up to compileSdk = 32

This warning can be suppressed by adding
    android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33

The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if 
the versions are equal.
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.
If the parent project does not need the plugin, add 'apply false' to the plugin line.
See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl
The Kotlin plugin was loaded in the following projects: ':react-native-gesture-handler', ':react-native-screens'

> Task :lottie-react-native:compileDebugJavaWithJavac

> Task :react-native-async-storage_async-storage:compileDebugJavaWithJavac

> Task :react-native-camera:compileGeneralDebugJavaWithJavac

> Task :react-native-community_datetimepicker:compileDebugJavaWithJavac

> Task :react-native-google-signin_google-signin:compileDebugJavaWithJavac

> Task :react-native-permissions:compileDebugJavaWithJavac

> Task :react-native-razorpay:compileDebugJavaWithJavac

> Task :react-native-svg:compileDebugJavaWithJavac

> Task :react-native-video:compileDebugJavaWithJavac

> Task :react-native-safe-area-context:compileDebugKotlin
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-safe-area-context\android\src\main\java\com\th3rdwave\safeareacontext\SafeAreaView.kt: (58, 23): 'getter for uiImplementation: UIImplementation!' is deprecated. Deprecated in Java

> Task :react-native-screens:compileDebugKotlin
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\Screen.kt: (77, 
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenWindowTraits.kt: (119, 47): 
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\events\HeaderAttachedEvent.kt: (7, 
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\events\TopLoadingFinishEvent.kt: (22, 42): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\events\TopLoadingFinishEvent.kt: (23, 21): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\events\TopLoadingProgressEvent.kt: (5, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\events\TopLoadingProgressEvent.kt: (11, 3): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. 
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\events\TopShouldStartLoadWithRequestEvent.kt: (27, 42): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\events\TopShouldStartLoadWithRequestEvent.kt: (28, 21): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java

> Task :react-native-webview:compileDebugJavaWithJavac

> Task :react-native-wheel-pick:compileDebugJavaWithJavac

> Task :app:compileDebugJavaWithJavac FAILED
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
263 actionable tasks: 246 executed, 17 up-to-date
Note: D:\code practice\projects\KissanPay-frontend\node_modules\lottie-react-native\src\android\src\main\java\com\airbnb\android\react\lottie\LottieAnimationViewManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\lottie-react-native\src\android\src\main\java\com\airbnb\android\react\lottie\LottieAnimationViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStorageModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\@react-native-async-storage\async-storage\android\src\javaPackage\java\com\reactnativecommunity\asyncstorage\AsyncStoragePackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-camera\android\src\main\java\com\google\android\cameraview\Camera2.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\@react-native-google-signin\google-signin\android\src\main\java\com\reactnativegooglesignin\RNGoogleSigninModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\@react-native-google-
Note: Recompile with -Xlint:deprecation for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-wheel-pick\android\src\main\java\com\tron\ReactWheelCurvedPickerManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D:\code practice\projects\KissanPay-frontend\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:49: error: package undefined does not exist
import undefined.ReactNativeWheelPickerPackage;
                ^
D:\code practice\projects\KissanPay-frontend\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:112: error: cannot find symbol
      new ReactNativeWheelPickerPackage()
          ^
  symbol:   class ReactNativeWheelPickerPackage
  location: class PackageList
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4m 1s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. 
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Note: D:\code practice\projects\KissanPay-frontend\node_modules\lottie-react-nativ
Note: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-video\android\src\main\java\com\brentvatne\react\ReactVideoViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-wheel-pick\android\src\main\java\com\tron\ReactWheelCurvedPicker.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-wheel-pick\android\src\main\java\com\tron\ReactWheelCurvedPickerManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D:\code practice\projects\KissanPay-frontend\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:49: error: package undefined does not exist
import undefined.ReactNativeWheelPickerPackage;
                ^
D:\code practice\projects\KissanPay-frontend\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:112: error: cannot find symbol
      new ReactNativeWheelPickerPackage()
          ^
  symbol:   class ReactNativeWheelPickerPackage
  location: class PackageList
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.
uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-wheel-pick\android\src\main\java\com\tron\ReactWheelCurvedPicker.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\code practice\projects\KissanPay-frontend\node_modules\react-native-wheel-pick\android\src\main\java\com\tron\ReactWheelCurvedPickerManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D:\code practice\projects\KissanPay-frontend\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:49: error: package undefined does not exist
import undefined.ReactNativeWheelPickerPackage;
                ^
D:\code practice\projects\KissanPay-frontend\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:112: error: cannot find symbol
      new ReactNativeWheelPickerPackage()
          ^
  symbol:   class ReactNativeWheelPickerPackage
  location: class PackageList
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4m 1s

    at makeError (D:\code practice\projects\KissanPay-frontend\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
    at D:\code practice\projects\KissanPay-frontend\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runOnAllDevices (D:\code practice\projects\KissanPay-frontend\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (D:\code practice\projects\KissanPay-frontend\node_modules\@react-native-community\cli\build\index.js:192:9)  
info Run CLI with --verbose flag for more details.

android/build.gradle

import org.apache.tools.ant.taskdefs.condition.Os

def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 33
        targetSdkVersion = 33
        ndkVersion = "21.4.7075529"
        supportLibVersion = "26.1.0"
        googlePlayServicesVersion = "11.8.0"
        androidMapsUtilsVersion = "0.5+"

    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {

        classpath('com.android.tools.build:gradle:7.2.1')
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:4.3.13'

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

allprojects {
    repositories {
        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")
        }
        mavenCentral {
            // We don't want to fetch react-native from Maven Central as there are
            // older versions over there.
            content {
                excludeGroup "com.facebook.react"
            }
        }
        google()
        maven { url 'https://www.jitpack.io' }

    }
    // configurations.all {
    //     resolutionStrategy {
    //         // Remove this override in 0.66, as a proper fix is included in react-native itself.
    //         force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
    //     }
    // }
}

android/app/build.gradle

apply plugin: "com.android.application"

import com.android.build.OutputFile

project.ext.react = [
    enableHermes: false,  // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

/**
 * The preferred build flavor of JavaScriptCore.
 *
 * For example, to use the international variant, you can use:
 * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
 *
 * The international variant includes ICU i18n library and necessary data
 * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
 * give correct results when using with locales other than en-US.  Note that
 * this variant is about 6MiB larger per architecture than default.
 */
def jscFlavor = 'org.webkit:android-jsc:+'

/**
 * Whether to enable the Hermes VM.
 *
 * This should be set on project.ext.react and that value will be read here. If it is not set
 * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
 * and the benefits of using Hermes will therefore be sharply reduced.
 */
def enableHermes = project.ext.react.get("enableHermes", false);

/**
 * Architectures to build native code for.
 */
def reactNativeArchitectures() {
    def value = project.getProperties().get("reactNativeArchitectures")
    return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
    ndkVersion rootProject.ext.ndkVersion

    compileSdkVersion rootProject.ext.compileSdkVersion

    defaultConfig {
        applicationId "com.vginfotec.superapp"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
        missingDimensionStrategy 'react-native-camera', 'general'

        if (isNewArchitectureEnabled()) {
            // We configure the NDK build only if you decide to opt-in for the New Architecture.
            externalNativeBuild {
                ndkBuild {
                    arguments "APP_PLATFORM=android-21",
                        "APP_STL=c++_shared",
                        "NDK_TOOLCHAIN_VERSION=clang",
                        "GENERATED_SRC_DIR=$buildDir/generated/source",
                        "PROJECT_BUILD_DIR=$buildDir",
                        "REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
                        "REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
                        "NODE_MODULES_DIR=$rootDir/../node_modules"
                    cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
                    cppFlags "-std=c++17"
                    // Make sure this target name is the same you specify inside the
                    // src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
                    targets "foody_appmodules"
                }
            }
            if (!enableSeparateBuildPerCPUArchitecture) {
                ndk {
                    abiFilters (*reactNativeArchitectures())
                }
            }
        }
    }

    if (isNewArchitectureEnabled()) {
        // We configure the NDK build only if you decide to opt-in for the New Architecture.
        externalNativeBuild {
            ndkBuild {
                path "$projectDir/src/main/jni/Android.mk"
            }
        }
        def reactAndroidProjectDir = project(':ReactAndroid').projectDir
        def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
            dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
            into("$buildDir/react-ndk/exported")
        }
        def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
            dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
            into("$buildDir/react-ndk/exported")
        }
        afterEvaluate {
            // If you wish to add a custom TurboModule or component locally,
            // you should uncomment this line.
            // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
            preDebugBuild.dependsOn(packageReactNdkDebugLibs)
            preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)

            // Due to a bug inside AGP, we have to explicitly set a dependency
            // between configureNdkBuild* tasks and the preBuild tasks.
            // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
            configureNdkBuildRelease.dependsOn(preReleaseBuild)
            configureNdkBuildDebug.dependsOn(preDebugBuild)
            reactNativeArchitectures().each { architecture ->
                tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
                    dependsOn("preDebugBuild")
                }
                tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
                    dependsOn("preReleaseBuild")
                }
            }
        }
    }

    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include (*reactNativeArchitectures())
        }
    }
    signingConfigs {
        debug {
            storeFile file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'

        }

        release {
            if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
                storeFile file(MYAPP_UPLOAD_STORE_FILE)
                storePassword MYAPP_UPLOAD_STORE_PASSWORD
                keyAlias MYAPP_UPLOAD_KEY_ALIAS
                keyPassword MYAPP_UPLOAD_KEY_PASSWORD
            }

    }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
             crunchPngs false
            // Caution! In production, you need to generate your own keystore file.
            // see https://reactnative.dev/docs/signed-apk-android.
            signingConfig signingConfigs.release
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }

    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // https://developer.android.com/studio/build/configure-apk-splits.html
            // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        defaultConfig.versionCode * 1000 + versionCodes.get(abi)
            }

        }
    }
    aaptOptions {
        cruncherEnabled = false
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
    implementation project(':react-native-vector-icons')

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }

    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        //noinspection GradleDynamicVersion
        implementation("com.facebook.react:hermes-engine:+") { // From node_modules
            exclude group:'com.facebook.fbjni'
        }
    } else {
        implementation jscFlavor
    }
}

if (isNewArchitectureEnabled()) {
    // If new architecture is enabled, we let you build RN from source
    // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
    // This will be applied to all the imported transtitive dependency.
    configurations.all {
        resolutionStrategy.dependencySubstitution {
            substitute(module("com.facebook.react:react-native"))
                    .using(project(":ReactAndroid"))
                    .because("On New Architecture we're building React Native from source")
            substitute(module("com.facebook.react:hermes-engine"))
                    .using(project(":ReactAndroid:hermes-engine"))
                    .because("On New Architecture we're building Hermes from source")
        }
    }
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.implementation
    into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

def isNewArchitectureEnabled() {
    // To opt-in for the New Architecture, you can either:
    // - Set `newArchEnabled` to true inside the `gradle.properties` file
    // - Invoke gradle with `-newArchEnabled=true`
    // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
    return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}

android/gradle/wrapper/gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
cortinico commented 1 year ago

Hi, Thanks for reporting this issue.

It seems like this issue is actually unrelated to React Native core. Please open this issue against this other repository:

https://github.com/lesliesam/react-native-wheel-picker/issues

I'll be closing this but feel free to reopen if the other repo points back to us as a issue in the core of React Native.

cortinico commented 1 year ago

@manishhedau that library is probably misconfigured and is causing your build to fail, so please report it this failure to the library maintainer.