Cocos2d-x v3.17.2 released!

Tested with Android Studio 3.4, NDK 19.2.xxx.

Download

v3.17.2.zip

Changes

  • [NEW] Network: added clear requests and responses method to httpclient

  • [NEW] UI: VideoPlayer added ability to enable/disable looping, resonding user input

  • [NEW] UI: VideoPlayer added function to set style

  • [NEW] IMEDispacher: added a function to check if any IME dispatcher is active

  • [NEW] Renderer: add a function to get current clearing color

  • [NEW] Lua: added binding codes for EventDispathcer::addCustomEventListener()

  • [REFINE] Android: added optimization codes for OPPO devcies

  • [REFINE] Network: improved websocket traces

  • [REFINE] Android: supported Android P cutout area

  • [REFINE] FontAtlas: font atlas texture initialization delayed

  • [REFINE] LOG: CCLOG may block thread on windows

  • [FIX] FileUtils:fixed a bug that listFiles() can not work correctly if the file path starts with assets/ on Android

  • [FIX] AssetsManager: fixed a bug that _percent is always be 0 during the update process

  • [FIX] Texture2D: fixed memory leak if Texture2D::setAlphaTexture() is invoked many times

  • [FIX] FontAtlasCache: avoided crash if a file path is too long

  • [FIX] Audio: fixed crash on iOS

  • [FIX] UI: VideoPlayer could not play video in obb file on Android

  • [FIX] SpriteFrame: fixed performance issue in parsing plist files

  • [FIX] 3rd: unzip failed to uncompress files

5 Likes

New release, long time no see! Is there some roadmap for cocos2d-x? (not for creator).

1 Like

Canā€™t compile js project, similar error 3.17.1

@piotrros we are working on metal support now.
@bayquabaoto may be it is because the path length is too long on windows, you many put the project under F: to have a try.

I tried and the result was the same

The second line in the screenshot gives an error that says files/directory not found.

What commands are you issuing to compile?

How did you get cocos2d-js? .zip from our website or did you clone our GitHub repo?

To make sure, run download-deps.py also.

1 Like

I download from this article link, I compile with ā€œcocos compile -p android --android-studio --ap android-15 -m releaseā€ and ā€œcocos compile -p android --android-studio -m releaseā€

This is an error when I compile by android studio

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ā€˜:CocosTemplate:mergeReleaseAssetsā€™.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:597)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.gradle.process.internal.ExecException: Process ā€˜command ā€˜cocos.batā€™ā€™ finished with non-zero exit value 14
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:389)
at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:36)
at org.gradle.api.internal.file.DefaultFileOperations.exec(DefaultFileOperations.java:189)
at org.gradle.api.internal.project.DefaultProject.exec(DefaultProject.java:1087)
at org.gradle.groovy.scripts.DefaultScript.exec(DefaultScript.java:253)
at org.gradle.api.Script$exec$1.callCurrent(Unknown Source)
at build_3jk2rbzkzw37b5511i2habn2t.compileJS(F:\CocosTemplate\frameworks\runtime-src\proj.android\app\build.gradle:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:479)
at org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(BeanDynamicObject.java:191)
at org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.tryInvokeMethod(BasicScript.java:130)
at org.gradle.internal.metaobject.ConfigureDelegate.invokeMethod(ConfigureDelegate.java:78)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:430)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:369)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:810)
at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:46)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:446)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:371)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
at build_3jk2rbzkzw37b5511i2habn2t$_run_closure2$_closure27.doCall(F:\CocosTemplate\frameworks\runtime-src\proj.android\app\build.gradle:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at groovy.lang.Closure.call(Closure.java:414)
at groovy.lang.Closure.call(Closure.java:430)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:726)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:699)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
ā€¦ 33 more

@bayquabaoto could you please paste all the commands you did? Thanks.

@zhangxm
cd F:
cocos new CocosTemplate -p com.tunt.cocostemplate -l js -d ./
cd ./CocosTemplate
cocos compile -p android --android-studio -m release

Thanks, we will take a look.

@zhangxm

Iā€™m use NDK r17c, r16b

@bayquabaoto we tried the commands you provided, there is not problem. The environments are:

  • NDK 19.2
  • Android Studio 3.4

You may update Android studio and NDK to have a try.

1 Like

@zhangxm
D:\Cocos2dx\android-ndk-r19b\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ar.exe: engine/external/android-specific/cpufeatures/CMakeFiles/ext_cpufeatures.dir/D_/Cocos2dx/android-ndk-r19b/sources/android/cpufeatures/cpu-features.c.o: No such file or directory
ninja: build stopped: subcommand failed.

@bayquabaoto I have a filling that you problem is too long path ā€œCocosTemplate\frameworks\runtime-srcā€.

@minggo what is the recommended/tested NDK version for 3.17.2?

@CrazyHappyGame thankā€™s, I am trying again.
You canā€™t paste download link NDK version for 3.17.2

1 Like

@zhangxm
@CrazyHappyGame
Thankā€™s, it is working.

where can we get NDK 19.2 ? I just see NDK r19c right here -> https://developer.android.com/ndk/downloads/

how come you recommend running ā€œdownload-deps.pyā€ if v3.17.2 just got released shouldnā€™t we already have the latest deps if we downloaded cocos2d-x-3.17.2.zip ?