简体   繁体   中英

Gradle Build issue while trying to run a react-native project using run-android command

While trying to execute react-native run-android command to run my react-native project on the Android Studio emulator, I am facing this build gradle issue. Can someone suggest any changes necessary?

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'newzera'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.glassfish.jaxb:jaxb-runtime:2.2.11.
     Required by:
         project : > com.android.tools.build:gradle:3.4.2 > com.android.tools.build:builder:3.4.2 > com.android.tools:sdklib:26.4.2 > com.android.tools:repository:26.4.2
      > Could not resolve org.glassfish.jaxb:jaxb-runtime:2.2.11.
         > Could not parse POM https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.pom
            > Could not resolve com.sun.xml.bind.mvn:jaxb-runtime-parent:2.2.11.
               > Could not resolve com.sun.xml.bind.mvn:jaxb-runtime-parent:2.2.11.
                  > Could not parse POM https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.2.11/jaxb-runtime-parent-2.2.11.pom
                     > Could not resolve com.sun.xml.bind.mvn:jaxb-parent:2.2.11.
                        > Could not resolve com.sun.xml.bind.mvn:jaxb-parent:2.2.11.
                           > Could not parse POM https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-parent/2.2.11/jaxb-parent-2.2.11.pom
                              > Could not resolve com.sun.xml.bind:jaxb-bom-ext:2.2.11.
                                 > Could not resolve com.sun.xml.bind:jaxb-bom-ext:2.2.11.
                                    > Could not parse POM https://jcenter.bintray.com/com/sun/xml/bind/jaxb-bom-ext/2.2.11/jaxb-bom-ext-2.2.11.pom
                                       > Invalid byte 2 of 4-byte UTF-8 sequence.

* 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 12s

it looks like the following plugin is causing an error in your gradle build:

org.glassfish.jaxb:jaxb-runtime:2.2.11.

Maybe you are applying a wrong gradle plugin. I would suggest to read the documentation that suggests you to apply this plugin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM