creator编译安卓项目时出错

  • Creator 版本:1.9.2

  • 目标平台: Android

  • 详细报错信息,包含调用堆栈:
    编译模式:release
    使用 Android Studio 工程:C:\Users\Administrator\Desktop\export\jsb-binary\frameworks\runtime-src\proj.android-studio
    正在生成 apk 文件…
    正在执行:’“C:\Users\Administrator\Desktop\export\jsb-binary\frameworks\runtime-src\proj.android-studio\gradlew.bat” --parallel --info assembleRelease’

Initialized native services in: C:\Users\Administrator.gradle\native
Removing daemon from the registry due to communication failure. Daemon information: DaemonInfo{pid=11780, address=[c171e358-8ff0-4703-9e50-91b82e01645e port:7711, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1530761566552, context=DefaultDaemonContext[uid=5feecfd7-760c-4b4d-bea8-d712b894efbc,javaHome=C:\Java\jdk1.7.0_80,daemonRegistryDir=C:\Users\Administrator.gradle\daemon,pid=11780,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]}
Removing 0 daemon stop events from registry
Previous Daemon (7068) stopped at Thu Jul 05 13:58:28 CST 2018 stop command received
Previous Daemon (9868) stopped at Thu Jul 05 14:13:34 CST 2018 stop command received
Previous Daemon (7412) stopped at Thu Jul 05 13:49:28 CST 2018 by user or operating system
Previous Daemon (11780) stopped at Thu Jul 05 14:17:17 CST 2018 by user or operating system
Starting a Gradle Daemon, 1 incompatible and 4 stopped Daemons could not be reused, use --status for details
Starting process ‘Gradle build daemon’. Working directory: C:\Users\Administrator.gradle\daemon\4.1 Command: C:\Java\jdk1.7.0_80\bin\java.exe -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=GBK -Duser.country=CN -Duser.language=zh -Duser.variant -cp C:\Users\Administrator.gradle\wrapper\dists\gradle-4.1-all\6aljcho5ti94cio10aoqa5qqs8\gradle-4.1\lib\gradle-launcher-4.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 4.1
Successfully started process ‘Gradle build daemon’
An attempt to start the daemon took 6.326 secs.
The client will now receive all logging from the daemon (pid: 10044). The daemon log file: C:\Users\Administrator.gradle\daemon\4.1\daemon-10044.out.log
Starting build in new daemon [memory: 954.7 MB]
Using 4 worker leases.
Creating new cache for fileHashes, path C:\Users\Administrator.gradle\caches\4.1\fileHashes\fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@6444b374
Creating new cache for resourceHashesCache, path C:\Users\Administrator.gradle\caches\4.1\fileHashes\resourceHashesCache.bin, access org.gradle.cache.internal.DefaultCacheAccess@6444b374
Creating new cache for fileHashes, path C:\Users\Administrator\Desktop\export\jsb-binary\frameworks\runtime-src\proj.android-studio.gradle\4.1\fileHashes\fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@4841798b
Creating new cache for plugin-use-metadata, path C:\Users\Administrator.gradle\caches\4.1\plugin-resolution\plugin-use-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@60d3b33b
Creating new cache for client-status, path C:\Users\Administrator.gradle\caches\4.1\plugin-resolution\client-status.bin, access org.gradle.cache.internal.DefaultCacheAccess@60d3b33b
Starting Build
Settings evaluated using settings file ‘C:\Users\Administrator\Desktop\export\jsb-binary\frameworks\runtime-src\proj.android-studio\settings.gradle’.
Projects loaded. Root project using build file ‘C:\Users\Administrator\Desktop\export\jsb-binary\frameworks\runtime-src\proj.android-studio\build.gradle’.
Included projects: [root project ‘proj.android-studio’, project ‘:libcocos2dx’, project ‘:mamamajiang’]
Parallel execution is an incubating feature.
Evaluating root project ‘proj.android-studio’ using build file ‘C:\Users\Administrator\Desktop\export\jsb-binary\frameworks\runtime-src\proj.android-studio\build.gradle’.
Creating new cache for metadata-1.1/results, path C:\Users\Administrator.gradle\caches\transforms-1\metadata-1.1\results.bin, access org.gradle.cache.internal.DefaultCacheAccess@1bc2cb54
Creating new cache for metadata-2.23/module-metadata, path C:\Users\Administrator.gradle\caches\modules-2\metadata-2.23\module-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@630cd066
Creating new cache for metadata-2.23/artifact-at-repository, path C:\Users\Administrator.gradle\caches\modules-2\metadata-2.23\artifact-at-repository.bin, access org.gradle.cache.internal.DefaultCacheAccess@630cd066
Evaluating project ‘:libcocos2dx’ using build file ‘D:\CocosCreator1.9\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build.gradle’.

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘D:\CocosCreator1.9\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build.gradle’ line: 1

  • What went wrong:
    A problem occurred evaluating project ‘:libcocos2dx’.

java.lang.UnsupportedClassVersionError: com/android/build/gradle/LibraryPlugin : Unsupported major.minor version 52.0

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 17s
执行命令出错,返回值:1。

  • 重现方式:
    creator编译安卓项目时出错

  • 之前哪个版本是正常的 :

  • 手机型号 :

  • 手机浏览器 :

  • 编辑器操作系统 :win10

  • 编辑器之前是否有其它报错 :

  • 出现概率:必现

  • 额外线索:

点编译时报错

应该是你的JDK版本不对导致的,升级到JDK1.8试试。

楼主解决了吗,我版本1.7.0的也报同样的错误