react-nativeperformancegradlegradlew

My React Native app doesn't start anymore when I run: npm run android


my app was running perfectly before I tried to compile it for production by running npx expo run:android --variant release which returned with an error. Now, when I run npm run android I get this error:

>  C:/Users/Mobile Apps/React Native/AwesomeProject/node_modules/expo-modules-core/android/.cxx/Debug/1g6k43ua/x86_64/CMakeFiles/expo-modules-core.dir/./
    

has 196 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      C_/Users/Mobile_Apps/React_Native/AwesomeProject/node_modules/expo-modules-core/common/cpp/ObjectDeallocator.cpp.o

    cannot be safely placed under this directory.  The build may not work
    correctly.


  ninja: error: manifest 'build.ninja' still dirty after 100 tries


* 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 1m 23s
384 actionable tasks: 19 executed, 365 up-to-date
Error: C:\Users\Mobile Apps\React Native\AwesomeProject\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache 
-PreactNativeDevServerPort=8081 -PreactNativeArchitectures=x86_64 exited with non-zero code: 1

There's my package.json: package.json package.json

I tried to cd android then run --stacktrace and --scan in order to get more insights and it gave me info about packages that was deprecated. I deleted them, now I get these results: --stacktrace and --scan output --stacktrace and --scan output


Solution

  • Try moving your app into a different folder

    For example

    From

    C:\Users\Mobile Apps\React Native\AwesomeProject\android\

    Move it to

    C:\ReactNative\Android

    It could be the windows problem, and there were simmiliar cases where moving to shorter directory helped

    https://github.com/mrousavy/react-native-vision-camera/issues/1941

    ninja: error: manifest 'build.ninja' still dirty after 100 tries

    https://github.com/expo/expo/issues/22444