博客
关于我
cocos creator (四)构建android项目
阅读量:190 次
发布时间:2019-02-28

本文共 4864 字,大约阅读时间需要 16 分钟。

我把构建步骤放到后面说,先说我遇到的几个问题。

第一

Using incremental javac compilation.

Incremental java compilation is an incubating feature.
Not using incremental javac compilation.
Using incremental javac compilation.
Not using incremental javac compilation.
Not using incremental javac compilation.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':helloworld'.
> NDK not configured.
Download it with SDK manager.)
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 8.074 secs
Stopped 0 compiler daemon(s).
执行命令出错,返回值:1。

这其实是因为sdk版本过高,导致ndk找不见的过。

jsb-default\frameworks\runtime-src\proj.android-studio\lcoal.properties

在这里仿造已经存在的sdk、路径。回车添加一行ndk路径就好。

第二

Compiling ...

Encoding ...
Done! Output file: E:\cocosCreatorPoject\Hello\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_spine.jsc
编译完成。
正在执行:'"E:\cocosCreatorPoject\Hello\build\jsb-default\frameworks\runtime-src\proj.android-studio\gradlew.bat" --parallel --info assembleRelease'
Downloading https://services.gradle.org/distributions/gradle-2.14.1-all.zip
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

cocos creator在编译的时候会下载一个gradle,等吧,要个30分钟左右就好了。(也可能是我的网慢。。)

第三

make.exe: Leaving directory `E:/cocosCreatorPoject/Hello
ild/jsb-default/frameworks/runtime-src/proj.android'
执行命令出错,返回值:2。
这个错误是因为ndk版本问题。。。以前是10b 所以导致一直没发现。竟然是10e。。。就是换成更高版本就行了。

构造步骤

首先要注意偏好设置。

如果实在不确定,就上网一个个查如何配置环境变量,这个地方的路径和环境变量的相同。

然后就点击标题栏的项目,里面有一个项目构建。点击后,我认为有两点注意(我自己也一只半解)

就是sdk先要有一个10的版本。

最后就会在build->jsb->public里有一个apk

你可能感兴趣的文章
ng6.1 新特性:滚回到之前的位置
查看>>
nghttp3使用指南
查看>>
【Flink】Flink 2023 Flink 自动化运维的大规模落地实践
查看>>
Nginx
查看>>
nginx + etcd 动态负载均衡实践(一)—— 组件介绍
查看>>
nginx + etcd 动态负载均衡实践(三)—— 基于nginx-upsync-module实现
查看>>
nginx + etcd 动态负载均衡实践(二)—— 组件安装
查看>>
nginx + etcd 动态负载均衡实践(四)—— 基于confd实现
查看>>
Nginx + Spring Boot 实现负载均衡
查看>>
Nginx + Tomcat + SpringBoot 部署项目
查看>>
Nginx + uWSGI + Flask + Vhost
查看>>
Nginx - Header详解
查看>>
nginx - thinkphp 如何实现url的rewrite
查看>>
Nginx - 反向代理、负载均衡、动静分离、底层原理(案例实战分析)
查看>>
Nginx - 反向代理与负载均衡
查看>>
nginx 1.24.0 安装nginx最新稳定版
查看>>
nginx 301 永久重定向
查看>>
nginx 301跳转
查看>>
nginx 403 forbidden
查看>>
nginx connect 模块安装以及配置
查看>>