0

Please I am a beginner in reactNative and i tried to creat an application using emulator and the command react-native run-android and this is what gone. Please help me

Description:

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 864 file(s) to forward-jetify. Using 4 workers... info Starting JS server... * daemon not running; starting now at tcp:5037 * daemon started successfully info Installing the app... Starting a Gradle Daemon, 1 incompatible and 3 stopped Daemons could not be reused, use --status for details

Task :app:transformClassesWithDexBuilderForDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings 17 actionable tasks: 8 executed, 9 up-to-date

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.

    Could not read path 'C:\Users\ruthel BAC\Desktop\firstAppReact\android\app\build\intermediates\transforms\dexBuilder\debug\96\androidx\customview'.

  • 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 39s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.

    Could not read path 'C:\Users\ruthel BAC\Desktop\firstAppReact\android\app\build\intermediates\transforms\dexBuilder\debug\96\androidx\customview'.

  • 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 39s

at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:13)
at runOnAllDevices (C:\Users\ruthel BAC\Desktop\firstAppReact\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\Users\ruthel BAC\Desktop\firstAppReact\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:179:41)
at then.result (C:\Users\ruthel BAC\Desktop\firstAppReact\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:133:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! firstAppReact@0.0.1 android: react-native run-android npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the firstAppReact@0.0.1 android script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\nodejs\npm-cache_logs\2020-02-28T09_11_15_219Z-debug.log

Akila Devinda
  • 5,054
  • 3
  • 19
  • 35
RuthelCrab
  • 153
  • 10
  • possible duplicate https://stackoverflow.com/questions/35890257/android-errorexecution-failed-for-task-apptransformclasseswithdexforrelease – Akila Devinda Feb 28 '20 at 09:30

1 Answers1

0
  • Cancel the process
  • Open new terminal
  • In your project directory, run
  • cd android --> .\gradlew clean
  • After finishing that, cd.. so that you can direct to the project file
  • Run react-native-start
  • Wait for the terminal shows: Looking for dependency, done
  • Then open the second terminal, direct to your project and run react-native run-android (or ios if you're using Xcode) I ran into this problem before so try this. Hope it'd help you
Ken Pham
  • 285
  • 6
  • 17