在尝试执行react-native run-android命令以在Android Studio模拟器上运行我的react-native项目时,我遇到了这个构建问题。有人可以提出任何必要的建议吗?
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
答案 0 :(得分:0)
似乎以下插件在gradle构建中导致错误:
org.glassfish.jaxb:jaxb-runtime:2.2.11.
也许您应用了错误的gradle插件。我建议阅读建议您应用此插件的文档。