05 CoCos Creator-native.log

  时间:2019-01-11
本文章向大家介绍05 CoCos Creator-native.log,主要包括05 CoCos Creator-native.log使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

1. Compile failed 编译保存信息

查看报错文件 C:\Users\Administrator.CocosCreator\logs\native.log

Error: Compile failed. The log file path [ C:\Users\Administrator\.CocosCreator\logs\native.log ]
    at ChildProcess.handleChildProcess (C:\CocosCreator\resources\app.asar\editor\core\native-utils.js:1:20297)
    at ChildProcess.e.on (C:\CocosCreator\resources\app.asar\editor\core\native-utils.js:1:7685)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

2. android-22 不存在

日志显示

编译模式:release
使用 Android Studio 工程:D:\CoCosCreator\HelloWorld\build\jsb-link\frameworks\runtime-src\proj.android-studio
正在生成 apk 文件...
build.gradle 文件中 compileSdkVersion 的值为 22,但是文件夹 C:\Users\Administrator\AppData\Local\Android\Sdk\platforms\android-22 不存在。
正在执行:'"D:\CoCosCreator\HelloWorld\build\jsb-link\frameworks\runtime-src\proj.android-studio\gradlew.bat" --parallel --info assembleRelease'

查看 Android Studio

3. 解决方案

API level 选择已经安装的版本即可

或者AndroidStudio新增android-22 即可


Packages to install: 
- Sources for Android 22 (sources;android-22)
- Android SDK Platform 22 (platforms;android-22)

Installing Sources for Android 22 in C:\Users\Administrator\AppData\Local\Android\Sdk\sources\android-22
"Install Sources for Android 22 (revision: 1)" complete.
"Install Sources for Android 22 (revision: 1)" finished.
Installing Android SDK Platform 22 in C:\Users\Administrator\AppData\Local\Android\Sdk\platforms\android-22
"Install Android SDK Platform 22 (revision: 2)" complete.
"Install Android SDK Platform 22 (revision: 2)" finished.

3. JAVA_HOME is set to an invalid directory

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_131\bin

发现这里多了bin

  • C:\Program Files\Java\jdk1.8.0_131

上一页 下一页

原文地址:http://www.manongjc.com/article/42957.html