Cocos 新建項目 以及編譯流程


Cocos 新建項目

 

 

cocos new gong2 -p com.gamejelly.gong2 -l lua -d /Users/wangchengcheng/Documents/SelfZone/Cocos

 

cocos new MyGame -p com.wacenn.mygame -l lua -d /Users/wangchengcheng/Documents/SelfZone/Cocos 

 

 

 

cocos new GameTest -p com.wacenn.gametest -l lua -d /Users/wangchengcheng/Documents/SelfZone/Cocos

 

 

new:new后是項目名 

-p :-p后是包名 

-l :-l后是語言(cpp指c++) 

-d :-d后是項目生成路徑

 

 

 

 

客戶端要做:

 

登錄,熱更新,資源加載,戰斗,地圖拖動,充值,自己實現

 

 

 

打包

 

 cocos compile -p android -m release --android-studio

編譯模式:release

使用 Android Studio 工程:/Users/wangchengcheng/Documents/GameJelly2/gong2client/trunk/gong2/frameworks/runtime-src/proj.android-studio

正在生成 apk 文件...

請輸入 '.keystore' 文件的絕對路徑(相對路徑):

/Users/wangchengcheng/Documents/GameJelly2/gong2client/trunk/gong2/frameworks/runtime-src/proj_gong2.android-studio/android.keystore 

請輸入簽名文件的別名:

android

請輸入簽名文件的密碼:

gamejelly123

請輸入別名的密碼:

gamejelly123

 

 

 

 

gradle 的問題

 

用命令build app時出現這個錯誤。

Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: /Users/weidingqiang/.gradle/wrapper/dists/gradle-2.4-all/3i2gobhdl0fm2tosnn15g540i0/gradle-2.4-all.zip

at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:61)

at org.gradle.wrapper.Install.createDist(Install.java:47)

at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)

at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)

 

解決方法

1.刪除/Users/weidingqiang/.gradle/wrapper/dists/gradle-2.4-all  

2.重新下載gradle-2.4-all.zip,放到/Users/weidingqiang/.gradle/wrapper/dists/gradle-2.4-all/3i2gobhdl0fm2tosnn15g540i0/ 目錄下

即可

人的一生能做好一件事就阿彌陀佛了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM