我收到以下错误
Information:Gradle tasks [:omniNotes:assembleDebug]
Warning:Dependency commons-logging:commons-logging:1.1.3 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency commons-logging:commons-logging:1.1.3 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
:omniNotes:preBuild UP-TO-DATE
:omniNotes:preDebugBuild UP-TO-DATE
:omniNotes:checkDebugManifest
:omniNotes:preReleaseBuild UP-TO-DATE
:omniNotes:prepareBeBillingtonCalendarRecurrencepickerLibrary111Library UP-TO-DATE
:omniNotes:prepareChAcraAcra470RC1Library UP-TO-DATE
:omniNotes:prepareComAndroidSupportAnimatedVectorDrawable2321Library UP-TO-DATE
:omniNotes:prepareComAndroidSupportAppcompatV72321Library UP-TO-DATE
:omniNotes:prepareComAndroidSupportDesign2321Library UP-TO-DATE
:omniNotes:prepareComAndroidSupportRecyclerviewV72321Library UP-TO-DATE
:omniNotes:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
:omniNotes:prepareComAndroidSupportSupportVectorDrawable2321Library UP-TO-DATE
:omniNotes:prepareComArtemzinRxjavaProguardRules10142Library UP-TO-DATE
:omniNotes:prepareComGetbaseFloatingactionbutton1101Library UP-TO-DATE
:omniNotes:prepareComGithubAfollestadMaterialDialogsCommons0856Library UP-TO-DATE
:omniNotes:prepareComGithubAfollestadMaterialDialogsCore0856Library UP-TO-DATE
:omniNotes:prepareComGithubFedericoiosueChecklistview313Library UP-TO-DATE
:omniNotes:prepareComGithubFedericoiosuePixlui25Library UP-TO-DATE
:omniNotes:prepareComGithubFedericoiosueSimpleGallery120Library UP-TO-DATE
:omniNotes:prepareComGithubFlavienlaurentDatetimepickerLibrary002Library UP-TO-DATE
:omniNotes:prepareComGithubGabrielemariottiChangeloglibChangelog200Library UP-TO-DATE
:omniNotes:prepareComGithubPaolorotoloAppintro130Library UP-TO-DATE
:omniNotes:prepareComGoogleAndroidGmsPlayServicesBase810Library UP-TO-DATE
:omniNotes:prepareComGoogleAndroidGmsPlayServicesBasement810Library UP-TO-DATE
:omniNotes:prepareComGoogleAndroidGmsPlayServicesLocation810Library UP-TO-DATE
:omniNotes:prepareComGoogleAndroidGmsPlayServicesMaps810Library UP-TO-DATE
:omniNotes:prepareComLarswerkmanHoloColorPicker14Library UP-TO-DATE
:omniNotes:prepareComNhaarmanListviewanimationsLibCore310Library UP-TO-DATE
:omniNotes:prepareComNhaarmanListviewanimationsLibManipulation310Library UP-TO-DATE
:omniNotes:prepareComPnikosisMaterialishProgress15Library UP-TO-DATE
:omniNotes:prepareComPushbulletAndroidExtensions104Library UP-TO-DATE
:omniNotes:prepareComSquareupLeakcanaryLeakcanaryAndroid13Library UP-TO-DATE
:omniNotes:prepareComTbruyelleRxpermissionsRxpermissions042Library UP-TO-DATE
:omniNotes:prepareDeKeyboardsurferAndroidWidgetCrouton184Library UP-TO-DATE
:omniNotes:prepareIoNlopezSmartlocationLibrary320Library UP-TO-DATE
:omniNotes:prepareIoReactivexRxandroid101Library UP-TO-DATE
:omniNotes:prepareMeZhanghaiAndroidMaterialprogressbarLibrary114Library UP-TO-DATE
:omniNotes:prepareDebugDependencies
:omniNotes:compileDebugAidl UP-TO-DATE
:omniNotes:compileDebugRenderscript UP-TO-DATE
:omniNotes:generateDebugBuildConfig UP-TO-DATE
:omniNotes:generateDebugAssets UP-TO-DATE
:omniNotes:mergeDebugAssets UP-TO-DATE
:omniNotes:generateDebugResValues UP-TO-DATE
:omniNotes:generateDebugResources UP-TO-DATE
:omniNotes:mergeDebugResources UP-TO-DATE
:omniNotes:processDebugManifest UP-TO-DATE
:omniNotes:processDebugResources UP-TO-DATE
:omniNotes:generateDebugSources UP-TO-DATE
:omniNotes:compileDebugJavaWithJavac FAILED
Error:Execution failed for task ':omniNotes:compileDebugJavaWithJavac'.
When running gradle with java 5, 6 or 7, you must set the path to jdk8, either with property retrolambda.jdk or environment variable JAVA8_HOME
Information:BUILD FAILED
Information:Total time: 13.861 secs
Information:1 error
Information:2 warnings
Information:See complete output in console
最佳答案
似乎 gradle 正在寻找 Java 8。看看你是否可以将它设置为使用 Java 7,因为你已经有了它。如果要设置 JAVA8_HOME,请找到系统上安装 Java 8 的位置。通常它的 C:\Program Files\Java\jdk8。现在执行以下操作
Java 开发工具包的安装路径。
关于java - 运行 gradle 6,7,8 时设置 jdk8 的路径是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36770154/