Error running run-android on a React project

Asked

Viewed 335 times

-1

I am trying to run the command "React-Native run-android" in project that was passed to me and is not working.

I have tried to change the file Gradle.properties to use Androidx but only gives another error, I have also tried to change the manifest file as the error suggests but also does not work.

console com o erro


> Task :app:processDebugManifest FAILED
/home/leleuvilela/Workspace/waproject-base-app/android/app/src/main/AndroidManifest.xml:22:18-91 Error:
        Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
        is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
        Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactopport-compat:28.0.0] AndroidManifest.xml:22:18-91
        is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreCompo
        Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml

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

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

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.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s
132 actionable tasks: 122 executed, 10 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I already downloaded a container from Docker just to run this project and it didn’t work either, so I guess it shouldn’t be my machine.

1 answer

0

Look here is not really an answer and after a while I’ll take it, it’s just to try to help you somehow....

You see, when it happens to me errors of this type with compilers and executors and in which I cannot solve, as a last attempt I create a new project, run to see if everything is okay and then I pass all the classes and implementations. If it works, I keep on the new project and abandon the old....

I have no point in this account to be able to comment so I wrote my suggestion as a reply even.... (Obs! I will take it because it is just for you to see even)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.