Issue
I installed everything on my computer and also set all environment variables of path and android_home but I still got these errors please help me to solve my problem. My Android studio is also running and the emulator is running too but I don't get what's the problem while running my React native app.
C:\Users\Pandat\Desktop\React\AwesomeProject>npx react-native run-android
info Running justifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jenifer found 864 file(s) to forward-jetify. Using 4 workers... info JS server already running. info Installing the app...
Task :app:processDebugManifest FAILED
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
10 actionable tasks: 2 executed, 8 up-to-date C:\Users\Pandat\Desktop\React\AwesomeProject\android\app\src\debug\AndroidManifest.xml:7:7-38 Error: Attribute application@name value=(com.example.app) from AndroidManifest.xml:7:7-38 is also present at AndroidManifest.xml:7:7-38 value=(com.awesomeproject.MainApplication). Suggestion: add 'tools:replace="android: name"' to element at AndroidManifest.xml:8:5-14:43 to override.
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute application@name value=(com.example.app) from AndroidManifest.xml:7:7-38 is also present at AndroidManifest.xml:7:7-38 value=(com.awesomeproject.MainApplication). Suggestion: add 'tools:replace="android: name"' to element at AndroidManifest.xml:8:5-14:43 to override.
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 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 C:\Users\Pandat\Desktop\React\AwesomeProject\android\app\src\debug\AndroidManifest.xml:7:7-38 Error: Attribute application@name value=(com.example.app) from AndroidManifest.xml:7:7-38 is also present at AndroidManifest.xml:7:7-38 value=(com.awesomeproject.MainApplication). Suggestion: add 'tools:replace="android:name"' to element at AndroidManifest.xml:8:5-14:43 to override.
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute application@name value=(com.example.app) from AndroidManifest.xml:7:7-38 is also present at AndroidManifest.xml:7:7-38 value=(com.awesomeproject.MainApplication). Suggestion: add 'tools:replace="android: name"' to element at AndroidManifest.xml:8:5-14:43 to override.
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 39s
at checkExecSyncError (child_process.js:610:11)
at execFileSync (child_process.js:628:15)
at runOnAllDevices (C:\Users\Pandat\Desktop\React\AwesomeProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at build and run (C:\Users\Pandat\Desktop\React\AwesomeProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\Pandat\Desktop\React\AwesomeProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (C:\Users\Pandat\Desktop\React\AwesomeProject\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:164:9)
Solution
May be you should rename your react native app and the project package by using this library https://www.npmjs.com/package/react-native-rename
npm install react-native-rename
react-native-rename "Travel App" -b com.junedomingo.travelapp
Answered By - 1pulsif
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.