@869025989 写道:
下面是C:\Users\Administrator.CocosCreator\logs\native.log 打印的日志:
编译模式:release
使用 Android Studio 工程:D:\tutorial-hot-update-master\build\jsb-link\frameworks\runtime-src\proj.android-studio
正在生成 apk 文件...
正在执行:'"D:\tutorial-hot-update-master\build\jsb-link\frameworks\runtime-src\proj.android-studio\gradlew.bat" --parallel --info assembleRelease'Initialized native services in: C:\Users\Administrator.gradle\native
Found daemon DaemonInfo{pid=11576, address=[b3d5683a-6115-4fb4-91bb-806d2902505f port:36554, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1578392165019, context=DefaultDaemonContext[uid=cf06ff48-dcee-482a-bb88-d568df01ba22,javaHome=C:\Program Files\Android\Android Studio\jre,daemonRegistryDir=C:\Users\Administrator.gradle\daemon,pid=11576,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-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_231,daemonRegistryDir=C:\Users\Administrator.gradle\daemon,pid=7180,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]
Actual: DefaultDaemonContext[uid=cf06ff48-dcee-482a-bb88-d568df01ba22,javaHome=C:\Program Files\Android\Android Studio\jre,daemonRegistryDir=C:\Users\Administrator.gradle\daemon,pid=11576,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 11420). The daemon log file: C:\Users\Administrator.gradle\daemon\4.10.3\daemon-11420.out.log
Starting 2nd build in daemon [uptime: 4 mins 39.939 secs, performance: 100%, GC rate: 0.06/s, tenured heap usage: 3% of 716.2 MB]
Using 4 worker leases.
Starting Build
Settings evaluated using settings file 'D:\tutorial-hot-update-master\build\jsb-link\frameworks\runtime-src\proj.android-studio\settings.gradle'.
Projects loaded. Root project using build file 'D:\tutorial-hot-update-master\build\jsb-link\frameworks\runtime-src\proj.android-studio\build.gradle'.
Included projects: [root project 'proj.android-studio', project ':libcocos2dx', project ':sd']
Parallel execution is an incubating feature.Configure project :
Evaluating root project 'proj.android-studio' using build file 'D:\tutorial-hot-update-master\build\jsb-link\frameworks\runtime-src\proj.android-studio\build.gradle'.Configure project :libcocos2dx
Evaluating project ':libcocos2dx' using build file 'E:\cocosCreator_2.2.2\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build.gradle'.
Creating configuration androidTestUtil
Creating configuration compile
Creating configuration publish
Creating configuration provided
Creating configuration api
Creating configuration implementation
Creating configuration runtimeOnly
Creating configuration compileOnly
Creating configuration wearApp
Creating configuration annotationProcessor
Creating configuration androidTestCompile
Creating configuration androidTestPublish
Creating configuration androidTestProvided
Creating configuration androidTestApi
Creating configuration androidTestImplementation
Creating configuration androidTestRuntimeOnly
Creating configuration androidTestCompileOnly
Creating configuration androidTestWearApp
Creating configuration androidTestAnnotationProcessor
Creating configuration testCompile
Creating configuration testPublish
Creating configuration testProvided
Creating configuration testApi
Creating configuration testImplementation
Creating configuration testRuntimeOnly
Creating configuration testCompileOnly
Creating configuration testWearApp
Creating configuration testAnnotationProcessor
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Program Files\Android\Android Studio\plugins\android-ndk.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.Creating configuration debugCompile
Creating configuration debugPublish
Creating configuration debugProvided
Creating configuration debugApi
Creating configuration debugImplementation
Creating configuration debugRuntimeOnly
Creating configuration debugCompileOnly
Creating configuration debugWearApp
Creating configuration debugAnnotationProcessor
Creating configuration androidTestDebugCompile
Creating configuration androidTestDebugPublish
Creating configuration androidTestDebugProvided
Creating configuration androidTestDebugApi
Creating configuration androidTestDebugImplementation
Creating configuration androidTestDebugRuntimeOnly
Creating configuration androidTestDebugCompileOnly
Creating configuration androidTestDebugWearApp
Creating configuration androidTestDebugAnnotationProcessor
Creating configuration testDebugCompile
Creating configuration testDebugPublish
Creating configuration testDebugProvided
Creating configuration testDebugApi
Creating configuration testDebugImplementation
Creating configuration testDebugRuntimeOnly
Creating configuration testDebugCompileOnly
Creating configuration testDebugWearApp
Creating configuration testDebugAnnotationProcessor
Creating configuration releaseCompile
Creating configuration releasePublish
Creating configuration releaseProvided
Creating configuration releaseApi
Creating configuration releaseImplementation
Creating configuration releaseRuntimeOnly
Creating configuration releaseCompileOnly
Creating configuration releaseWearApp
Creating configuration releaseAnnotationProcessor
Creating configuration testReleaseCompile
Creating configuration testReleasePublish
Creating configuration testReleaseProvided
Creating configuration testReleaseApi
Creating configuration testReleaseImplementation
Creating configuration testReleaseRuntimeOnly
Creating configuration testReleaseCompileOnly
Creating configuration testReleaseWearApp
Creating configuration testReleaseAnnotationProcessor
Parsing the SDK, no caching allowed
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\build-tools\29.0.2\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\extras\android\m2repository\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\extras\google\m2repository\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\extras\m2repository\com\android\support\constraint\constraint-layout-solver\1.0.2\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\extras\m2repository\com\android\support\constraint\constraint-layout\1.0.2\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\patcher\v4\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\platforms\android-29\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\sources\android-29\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\android-sdk\tools\package.xml
Checking the license for package Android SDK Build-Tools 28.0.3 in C:\Users\Administrator\AppData\Local\Android\android-sdk\licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':libcocos2dx'.Failed to find Platform SDK with path: platforms;android--1
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 1s
执行命令出错,返回值:1。
帖子: 1
参与者: 1