gpt4 book ai didi

android - unityLibrary :compileDebugJavaWithJavac

转载 作者:行者123 更新时间:2023-12-05 00:18:28 30 4
gpt4 key购买 nike

所以当我点击构建项目时它说零错误但我仍然得到这个

 Executing tasks: [clean, :unityLibrary:assembleDebug, :launcher:assembleDebug] in 
project C:\Users\mehmo\OneDrive\Documents\Game


> Configure project :launcher
WARNING: The option 'android.enableR8' is deprecated and should not be used
anymore.
It will be removed in a future version of the Android Gradle plugin, and will no
longer allow you to disable R8.

> Task :clean UP-TO-DATE
> Task :launcher:clean
> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preDebugBuild UP-TO-DATE
> Task :launcher:mergeDebugJniLibFolders
> Task :launcher:generateDebugBuildConfig
> Task :launcher:generateDebugResValues
> Task :launcher:mergeDebugNativeLibs
> Task :launcher:stripDebugDebugSymbols
> Task :launcher:copyDebugJniLibsProjectAndLocalJars
> Task :launcher:mergeDebugShaders
> Task :launcher:compileDebugShaders
> Task :launcher:generateDebugAssets
> Task :launcher:packageDebugAssets
> Task :launcher:packageDebugRenderscript NO-SOURCE
> Task :launcher:prepareLintJarForPublish UP-TO-DATE
> Task :launcher:processDebugJavaRes NO-SOURCE
> Task :launcher:processDebugManifest
> Task :launcher:mergeDebugJavaResource
> Task :unityLibrary:clean
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:preDebugBuild UP-TO-DATE
> Task :unityLibrary:compileDebugAidl NO-SOURCE
> Task :launcher:compileDebugAidl NO-SOURCE

> Task :unityLibrary:BuildIl2CppTask
Building libil2cpp.so with AndroidToolChain
Output directory: C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\src\main\jniLibs\armeabi-v7a
Cache directory: C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\build\il2cpp_armeabi-v7a_Release\il2cpp_cache
ObjectFiles: 221 of which compiled: 221
Time Compile: 12829 milliseconds Lump_libil2cpp_vm.cpp
Time Compile: 12407 milliseconds Il2CppInvokerTable.cpp
Time Compile: 11982 milliseconds Unity.TextMeshPro2.cpp
Time Compile: 11898 milliseconds Generics1.cpp
Time Compile: 11286 milliseconds Generics.cpp
Time Compile: 10922 milliseconds Unity.TextMeshPro3.cpp
Time Compile: 10625 milliseconds mscorlib4.cpp
Time Compile: 9856 milliseconds Unity.TextMeshPro4.cpp
Time Compile: 9713 milliseconds Lump_libil2cpp_icalls.cpp
Time Compile: 8830 milliseconds Generics10.cpp
Total compilation time: 56052 milliseconds.
Total link time: 2164 milliseconds.
Cleaned up 0 object files.
Building libil2cpp.so with AndroidToolChain
Output directory: C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\src\main\jniLibs\arm64-v8a
Cache directory: C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\build\il2cpp_arm64-v8a_Release\il2cpp_cache
ObjectFiles: 221 of which compiled: 221
Time Compile: 12777 milliseconds Lump_libil2cpp_vm.cpp
Time Compile: 11706 milliseconds Il2CppInvokerTable.cpp
Time Compile: 11465 milliseconds Generics1.cpp
Time Compile: 11200 milliseconds Unity.TextMeshPro2.cpp
Time Compile: 10710 milliseconds Generics.cpp
Time Compile: 10155 milliseconds Unity.TextMeshPro3.cpp
Time Compile: 9667 milliseconds Lump_libil2cpp_icalls.cpp
Time Compile: 9315 milliseconds mscorlib4.cpp
Time Compile: 9026 milliseconds Unity.TextMeshPro4.cpp
Time Compile: 8415 milliseconds Generics3.cpp
Total compilation time: 54646 milliseconds.
Total link time: 3373 milliseconds.
Cleaned up 0 object files.

> Task :unityLibrary:mergeDebugJniLibFolders
> Task :unityLibrary:compileDebugRenderscript NO-SOURCE
> Task :unityLibrary:generateDebugBuildConfig
> Task :unityLibrary:generateDebugResValues
> Task :unityLibrary:generateDebugResources
> Task :unityLibrary:packageDebugResources
> Task :unityLibrary:parseDebugLocalResources
> Task :unityLibrary:mergeDebugShaders
> Task :unityLibrary:compileDebugShaders
> Task :unityLibrary:generateDebugAssets
> Task :unityLibrary:packageDebugAssets
> Task :unityLibrary:packageDebugRenderscript NO-SOURCE
> Task :launcher:compileDebugRenderscript NO-SOURCE
> Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
> Task :launcher:generateDebugResources
> Task :unityLibrary:processDebugJavaRes NO-SOURCE
> Task :unityLibrary:processDebugManifest
> Task :unityLibrary:javaPreCompileDebug
> Task :launcher:packageDebugResources
> Task :launcher:parseDebugLocalResources
> Task :unityLibrary:mergeDebugNativeLibs
> Task :unityLibrary:stripDebugDebugSymbols
> Task :unityLibrary:copyDebugJniLibsProjectAndLocalJars
> Task :unityLibrary:mergeDebugJavaResource
> Task :unityLibrary:generateDebugRFile
FAILURE:构建失败并出现异常。
  • 什么地方出了错:
    任务 ':unityLibrary:compileDebugJavaWithJavac' 执行失败。

  • Failed to query the value of task ':unityLibrary:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'.Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\build\generated\ap_generated_sources\debug\out))) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer@35383760) before task ':unityLibrary:compileDebugJavaWithJavac' has completed is not supported


  • 尝试:
    使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
  • https://help.gradle.org 获得更多帮助

  • 此构建中使用了已弃用的 Gradle 功能,使其与 Gradle 8.0 不兼容。
    使用“--warning-mode all”显示各个弃用警告。
    https://docs.gradle.org/7.0.1/userguide/command_line_interface.html#sec:command_line_warnings
    在 1m 59s 内构建失败
    34 个可操作的任务:31 个已执行,3 个是最新的
    在调试中我得到这个:
    2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
    2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
    2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
    2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':unityLibrary:compileDebugJavaWithJavac'.
    2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Failed to query the value of task ':unityLibrary:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'.
    2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\build\generated\ap_generated_sources\debug\out))) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer@4ece53fe) before task ':unityLibrary:compileDebugJavaWithJavac' has completed is not supported
    2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
    2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
    2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
    2021-05-19T16:15:40.481+0100 [警告] [org.gradle.internal.featurelifecycle.LoggingDeprecatedFeatureHandler]
    此构建中使用了已弃用的 Gradle 功能,使其与 Gradle 8.0 不兼容。
    使用“--warning-mode all”显示各个弃用警告。
    https://docs.gradle.org/7.0.1/userguide/command_line_interface.html#sec:command_line_warnings
    2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 
    2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 2m 1s

    最佳答案

    我也遇到了这个问题,并决定放弃我的整个项目并进行干净的设置。原来 Gradle 7.x 与 Android 开发不兼容。如果您将 Gradle 降级到 6.9,一切都会按预期进行。
    这也可以解释为什么“构建项目”有效,但通过 Gradle 无效,它是一个不同的包装器实例。

    关于android - unityLibrary :compileDebugJavaWithJavac,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67606085/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com