skip to Main Content

I installed react-native and created a new project using the command
npx react-native init AwesomeProject (I have not added any code) and when I run the project using npx react-native run-android
I get an error Task :app:processDebugResources FAILED

After using --warning-mode all I now get the following feedback:

IncrementalTaskInputs has been deprecated. This is scheduled to be
removed in Gradle 8.0. On method
‘IncrementalTask.taskAction$gradle_core’ use
‘org.gradle.work.InputChanges’ instead. Consult the upgrading guide
for further information:
https://docs.gradle.org/7.5.1/userguide/upgrading_version_7.html#incremental_task_inputs_deprecation
at react_umo8btiw38k009lp8jdme1yz$_run_closure8$_closure10$_closure13.doCall(C:WindowsSystem32AwesomeProjectnode_modulesreact-nativereact.gradle:395)
(Run with –stacktrace to get the full stack trace of this deprecation warning.)

How can I fix this? I wasted hours trying to fix it. I just want to to code a bit but I’m instead stuck at this..

JDK version: 11.0.16.1

Gradle version: 7.5.1

3

Answers


  1. Chosen as BEST ANSWER

    Okay problem solved. I initially created the project in the directory my command prompt defaults to which is "C:windowssystem32". This seems to have caused the problem (probably it has something to do with permissions).

    Once I used a different directory and created the same project it worked without issues.


  2. I got similar warning log(s), but first of all, my answer is only for future readers;
    (Because OP did have complete separete issue than what he asked for.)


    I was sure my own build-script did NOT use IncrementalTaskInputs anywhere.

    Hence, I first tried update to newer Gradle-wrapper, without expected result.

    Like ./gradlew wrapper --gradle-version 7.5.1

    Finally, seems IncrementalTaskInputs is used by Kotlin, hence updating that should get rid of the said warning
    and/or future-error (as the warning says, it will throw error in future).

    But an additional problem is, Kotlin version bundled with my dependencies conflicts silently, causing strange Runtime-crashes and/or errors.
    Meaning, we can not update Kotlin until the day each our dependency does update as well.

    Login or Signup to reply.
  3. After installing new react-native app and your app is not launching, follow the below steps.

    Note: Ensure you have minimum of 5GB space on your HDD.

    1. Close both “Metro Server” and “Android Emulator”.
    2. Launch “Android Studio”, navigaete to “Device Manager”, then “Wipe Data” of the android device installed.
    3. Click on “Cold Boot Now” from the installed device in Android Studio, and wait for the device to finish booting.
    4. cd android && ./gradlew clean & cd ..
    5. npx react-native run-android
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search