构建成功了,但是编译成android原生时失败
-
Creator 版本:2.4.7
-
目标平台:Android
-
重现方式:构成成功,编译失败
-
报错日志: Building mode: debug
Using Android Studio project : D:\project-zombie\zombeat\build\jsb-link\frameworks\runtime-src\proj.android-studio
Building apk…
running: ‘“D:\project-zombie\zombeat\build\jsb-link\frameworks\runtime-src\proj.android-studio\gradlew.bat” --parallel --info assembleDebug’
Downloading https://services.gradle.org/distributions/gradle-6.7.1-all.zip
…
Unzipping C:\Users\MYH.gradle\wrapper\dists\gradle-6.7.1-all\1cdfdhmv7jlccg398629lhd1uj\gradle-6.7.1-all.zip to C:\Users\MYH.gradle\wrapper\dists\gradle-6.7.1-all\1cdfdhmv7jlccg398629lhd1uj
Initialized native services in: C:\Users\MYH.gradle\native
Welcome to Gradle 6.7.1!
Here are the highlights of this release:
- File system watching is ready for production use
- Declare the version of Java your build requires
- Java 15 support
For more details see Gradle 6.7.1 Release Notes
Found daemon DaemonInfo{pid=14152, address=[92e03806-d743-4eaa-b5a5-cb4ef007f408 port:62022, addresses:[/127.0.0.1]], state=Idle, lastBusy=1652439442327, context=DefaultDaemonContext[uid=e5980230-4681-4a2c-b955-01a69f701a72,javaHome=D:\Android\jre,daemonRegistryDir=C:\Users\MYH.gradle\daemon,pid=14152,idleTimeout=10800000,priority=NORMAL,daemonOpts=-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.8.0_144,daemonRegistryDir=C:\Users\MYH.gradle\daemon,pid=1504,idleTimeout=null,priority=NORMAL,daemonOpts=-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]
Actual: DefaultDaemonContext[uid=e5980230-4681-4a2c-b955-01a69f701a72,javaHome=D:\Android\jre,daemonRegistryDir=C:\Users\MYH.gradle\daemon,pid=14152,idleTimeout=10800000,priority=NORMAL,daemonOpts=-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]
Looking for a different daemon…
Removing 0 daemon stop events from registry
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Starting process ‘Gradle build daemon’. Working directory: C:\Users\MYH.gradle\daemon\6.7.1 Command: C:\Program Files\Java\jdk1.8.0_144\bin\java.exe -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=GBK -Duser.country=CN -Duser.language=zh -Duser.variant -cp C:\Users\MYH.gradle\wrapper\dists\gradle-6.7.1-all\1cdfdhmv7jlccg398629lhd1uj\gradle-6.7.1\lib\gradle-launcher-6.7.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.7.1
Successfully started process ‘Gradle build daemon’
An attempt to start the daemon took 1.804 secs.
The client will now receive all logging from the daemon (pid: 10388). The daemon log file: C:\Users\MYH.gradle\daemon\6.7.1\daemon-10388.out.log
Starting build in new daemon [memory: 477.6 MB]
Using 12 worker leases.
FAILURE: Build failed with an exception.
- What went wrong:
Gradle could not start your build.
Could not create service of type FileHasher using BuildSessionServices.createFileHasher().
Unexpected lock protocol found in lock file. Expected 3, found 0.
-
Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 34s
Error running command, return code: 1.
麻烦大佬一下