-
Creator 版本:2.4.3
-
目标平台:Android
-
重现方式:在creator上点击打包,然后使用android studio尝试Build Apk时报错,gradle的版本配置如下,可以正常同步。
报错内容:
Executing tasks: [:MatchmanMaBaoGuo:assembleDebug] in project D:\AndroidBuild\jsb-link\frameworks\runtime-src\proj.android-studio
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Task :libcocos2dx:preBuild UP-TO-DATE
Task :libcocos2dx:preDebugBuild UP-TO-DATE
Task :libcocos2dx:compileDebugAidl NO-SOURCE
Task :libcocos2dx:compileDebugRenderscript NO-SOURCE
Task :libcocos2dx:generateDebugBuildConfig UP-TO-DATE
Task :libcocos2dx:generateDebugResValues UP-TO-DATE
Task :libcocos2dx:generateDebugResources UP-TO-DATE
Task :libcocos2dx:packageDebugResources UP-TO-DATE
Task :libcocos2dx:parseDebugLocalResources UP-TO-DATE
Task :libcocos2dx:processDebugManifest UP-TO-DATE
Task :libcocos2dx:generateDebugRFile UP-TO-DATE
Task :libcocos2dx:javaPreCompileDebug UP-TO-DATE
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:libcocos2dx:compileDebugJavaWithJavac’.
Failed to calculate the value of task ‘:libcocos2dx: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:\CocosDashboard_1.0.20\resources.editors\Creator\2.4.3\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\generated\ap_generated_sources\debug\out))) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer@2f3701cc) before task ‘:libcocos2dx:compileDebugJavaWithJavac’ has completed is not supported
- 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
BUILD FAILED in 119ms
7 actionable tasks: 7 up-to-date
使用gradle compileDebugSources --stacktrace -info命令查看了详细的日志,但是并不清楚该如何定位
- Exception is:
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
at org.gradle.internal.extensibility.DefaultExtraPropertiesExtension.(DefaultExtraPropertiesExtension.java:29)
at org.gradle.internal.extensibility.DefaultConvention.(DefaultConvention.java:48)
at org.gradle.api.internal.plugins.DefaultConvention.(DefaultConvention.java:28)
…
