Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28476

react-native run-android keeps failing. What am I doing wrong?

$
0
0

I setup a react native environment and created a new project using react native cli. But it fails when I run react-native run-android

This is what I get in my terminal. Can anyone please help?

PS C:\Users\Mahali\Documents\Work\Code\Project> npx react-native run-android 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 8 workers... info Starting JS server...

info Installing the app...

[Fatal Error] versionedparcelable-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] lifecycle-runtime-2.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] documentfile-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] localbroadcastmanager-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] print-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] loader-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] legacy-support-core-ui-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] lifecycle-viewmodel-2.0.0.pom:2:1: Content is not allowed in prolog. FAILURE: Build failed with an exception. * What went wrong:

Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. > Could not resolve androidx.lifecycle:lifecycle-runtime:2.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.core:core:1.0.1

> Could not resolve androidx.lifecycle:lifecycle-runtime:2.0.0.

> Could not parse POM https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.0.0/lifecycle-runtime-2.0.0.pom> Content is not allowed in prolog. > Could not resolve androidx.versionedparcelable:versionedparcelable:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.core:core:1.0.1

> Could not resolve androidx.versionedparcelable:versionedparcelable:1.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/versionedparcelable/versionedparcelable/1.0.0/versionedparcelable-1.0.0.pom> Content is not allowed in prolog. > Could not resolve androidx.documentfile:documentfile:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.legacy:legacy-support-core-utils:1.0.0 > Could not resolve androidx.documentfile:documentfile:1.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/documentfile/documentfile/1.0.0/documentfile-1.0.0.pom> Content is not allowed in prolog.

> Could not resolve androidx.loader:loader:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.legacy:legacy-support-core-utils:1.0.0 project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.fragment:fragment:1.0.0
> Could not resolve androidx.loader:loader:1.0.0.

> Could not parse POM https://dl.google.com/dl/android/maven2/androidx/loader/loader/1.0.0/loader-1.0.0.pom> Content is not allowed in prolog.

> Could not resolve androidx.localbroadcastmanager:localbroadcastmanager:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.legacy:legacy-support-core-utils:1.0.0 > Could not resolve androidx.localbroadcastmanager:localbroadcastmanager:1.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/localbroadcastmanager/localbroadcastmanager/1.0.0/localbroadcastmanager-1.0.0.pom> Content is not allowed in prolog. > Could not resolve androidx.print:print:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.legacy:legacy-support-core-utils:1.0.0 > Could not resolve androidx.print:print:1.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/print/print/1.0.0/print-1.0.0.pom> Content is not allowed in prolog.

> Could not resolve androidx.legacy:legacy-support-core-ui:1.0.0. Required by: project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.fragment:fragment:1.0.0 project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.vectordrawable:vectordrawable-animated:1.0.0 > Could not resolve androidx.legacy:legacy-support-core-ui:1.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/legacy/legacy-support-core-ui/1.0.0/legacy-support-core-ui-1.0.0.pom> Content is not allowed in prolog. > Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.fragment:fragment:1.0.0
> Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.0.0/lifecycle-viewmodel-2.0.0.pom> Content is not allowed in prolog. * 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.orgBUILD FAILED in 14s 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

[Fatal Error] versionedparcelable-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] lifecycle-runtime-2.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] documentfile-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] localbroadcastmanager-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] print-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] loader-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] legacy-support-core-ui-1.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] lifecycle-viewmodel-2.0.0.pom:2:1: Content is not allowed in prolog. FAILURE: Build failed with an exception. * What went wrong:

Could not determine the dependencies of task ':app:mergeDebugAssets'.

> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. > Could not resolve androidx.lifecycle:lifecycle-runtime:2.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.core:core:1.0.1

> Could not resolve androidx.lifecycle:lifecycle-runtime:2.0.0.

> Could not parse POM https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.0.0/lifecycle-runtime-2.0.0.pom> Content is not allowed in prolog. > Could not resolve androidx.versionedparcelable:versionedparcelable:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.core:core:1.0.1

> Could not resolve androidx.versionedparcelable:versionedparcelable:1.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/versionedparcelable/versionedparcelable/1.0.0/versionedparcelable-1.0.0.pom> Content is not allowed in prolog. > Could not resolve androidx.documentfile:documentfile:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.legacy:legacy-support-core-utils:1.0.0 > Could not resolve androidx.documentfile:documentfile:1.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/documentfile/documentfile/1.0.0/documentfile-1.0.0.pom> Content is not allowed in prolog.

> Could not resolve androidx.loader:loader:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.legacy:legacy-support-core-utils:1.0.0 project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.fragment:fragment:1.0.0
> Could not resolve androidx.loader:loader:1.0.0.

> Could not parse POM https://dl.google.com/dl/android/maven2/androidx/loader/loader/1.0.0/loader-1.0.0.pom> Content is not allowed in prolog.

> Could not resolve androidx.localbroadcastmanager:localbroadcastmanager:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.legacy:legacy-support-core-utils:1.0.0 > Could not resolve androidx.localbroadcastmanager:localbroadcastmanager:1.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/localbroadcastmanager/localbroadcastmanager/1.0.0/localbroadcastmanager-1.0.0.pom> Content is not allowed in prolog. > Could not resolve androidx.print:print:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.legacy:legacy-support-core-utils:1.0.0 > Could not resolve androidx.print:print:1.0.0.

> Could not parse POM https://dl.google.com/dl/android/maven2/androidx/print/print/1.0.0/print-1.0.0.pom> Content is not allowed in prolog.

> Could not resolve androidx.legacy:legacy-support-core-ui:1.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.fragment:fragment:1.0.0 project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.vectordrawable:vectordrawable-animated:1.0.0 > Could not resolve androidx.legacy:legacy-support-core-ui:1.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/legacy/legacy-support-core-ui/1.0.0/legacy-support-core-ui-1.0.0.pom> Content is not allowed in prolog. > Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.0.0. Required by:

project :app > com.facebook.react:react-native:0.61.3 > androidx.appcompat:appcompat:1.0.2 > androidx.fragment:fragment:1.0.0
> Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.0.0. > Could not parse POM https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.0.0/lifecycle-viewmodel-2.0.0.pom> Content is not allowed in prolog. * 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.orgBUILD FAILED in 14s at checkExecSyncError (child_process.js:603:11)

at execFileSync (child_process.js:621:15)

at runOnAllDevices (C:\Users\Mahali\Documents\Work\Code\Project\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39) at buildAndRun (C:\Users\Mahali\Documents\Work\Code\Project\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41) at C:\Users\Mahali\Documents\Work\Code\Project\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12 at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Command.handleAction (C:\Users\Mahali\Documents\Work\Code\Project\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:164:9)

Viewing all articles
Browse latest Browse all 28476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>