android– 无法通知项目评估监听器> javaxxmlbindannotationXmlSchema

android– 无法通知项目评估监听器> javaxxmlbindannotationXmlSchema,第1张

概述我试图首先使用react-native run-android运行一个react-native应用程序.我希望它能够工作,就像我调用react-native run-ios时一样.堆栈中有很多用户遇到同样的错误,“无法通知项目评估监听器”.观察到的行为> react-native run-android Scanning folders for sym

我试图首先使用react-native run-android运行一个react-native应用程序.我希望它能够工作,就像我调用react-native run-ios时一样.
堆栈中有很多用户遇到同样的错误,“无法通知项目评估监听器”.

观察到的行为

> react-native run-androIDScanning folders for symlinks in /Users/tiagogouvea/www/go-along/mobile/node_modules (12ms)Js server already running.Building and installing the app on the device (cd androID && ./gradlew installDeBUG)...WARNING: An illegal reflective access operation has occurredWARNING: Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/Users/tiagogouvea/.gradle/wrapper/dists/gradle-4.0-milestone-1-all/2rnr7rhi2zsmkxo9re7615fy6/gradle-4.0-milestone-1/lib/gradle-base-services-4.0.jar) to method java.lang.classLoader.getPackages()WARNING: Please consIDer reporting this to the maintainers of org.gradle.internal.reflect.JavaMethodWARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operationsWARNING: All illegal access operations will be denIEd in a future releaseNDK is missing a "platforms" directory.If you are using NDK,verify the ndk.dir is set to a valID NDK directory.  It is currently set to /Users/tiagogouvea/library/AndroID/sdk/ndk-bundle.If you are not using NDK,unset the NDK variable from ANDROID_NDK_HOME or local.propertIEs to remove this warning.FAILURE: Build Failed with an exception.* What went wrong:A problem occurred configuring project ':app'.> Failed to notify project evaluation Listener.   > javax/xml/bind/annotation/XmlSchema* Try:Run with --stacktrace option to get the stack trace. Run with --info or --deBUG option to get more log output.BUILD Failed in 4sCould 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 haveset up your AndroID development environment:https://facebook.github.io/react-native/docs/androID-setup.HTML

环境

> npm ls react-native-scripts:为空
> npm ls react-native:react-native@0.50.3
> npm ls expo:空
> node -v:v8.0.0
> npm -v:5.5.1
>纱线 – 转换:1.2.1
>守望者版:4.9.0

> *** 作系统:macOs 10.12.6
>手机/模拟器/模拟器&版本:Genymotion图像最佳答案正如OP对bug提交的评论中所提到的,Gradle似乎在Java 9或更高版本中存在问题.

您需要安装JDK 8(JRE是不够的,8之后的版本将不起作用)并告诉Gradle使用它,而不是系统上的默认Java版本.

在我的情况下(运行Ubuntu 18.04),这需要安装openjdk-8-jdk(我已经有JDK 11和JRE 8但不是JDK 8).

您有几种方法可以告诉Gradle使用JDK 8(在所有示例中,将路径替换为JDK安装的实际路径;此处显示的路径对Ubuntu 18.04 amd64有效):

>使用选项运行Gradle

-Dorg.gradle.java.home=/usr/lib/jvm/java-8-openjdk-amd64

>确保〜/ .gradle / gradle.propertIEs包含该行

org.gradle.java.home=/usr/lib/jvm/java-8-openjdk-amd64

>在build.gradle中包含以下行:

compileJava.options.fork = truecompileJava.options.forkOptions.executable = /usr/lib/jvm/java-8-openjdk-amd64

这帮助我摆脱了不同项目的同样错误.

总结

以上是内存溢出为你收集整理的android – 无法通知项目评估监听器> javax / xml / bind / annotation / XmlSchema全部内容,希望文章能够帮你解决android – 无法通知项目评估监听器> javax / xml / bind / annotation / XmlSchema所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1139546.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-31
下一篇 2022-05-31

发表评论

登录后才能评论

评论列表(0条)

保存