How to speed up cocos2d-x build with prebuilt lib

How to speed up cocos2d-x build with prebuilt lib
0

#147

@aqeeliqbal a good rule of thumb. When developing, go slow and understand each step involved. If you don’t ask. This is what we are here for! Errors in understanding mean you spend more time debugging and taking stabs in the dark. Then your game gets delayed or you never finish it. :slight_smile:


#148

-m debug should work also. I’d try it again to see what happens. I’ll test it too later today when I can afford a hour of compile time.


#149

yes, it’s better to start with ios, android is worse.
to be more clear, if you are building in debug mode, point 7 of the guide solves the issue, that is, you have to open cocos2dx xcode master project and set build only for active architecture to no in debug mode. Then check the library as in point 8 for good.
hope it helps.


#150

Followed these steps and used Debug command to create libs. It worked.

@crittergorge @slackmoehrle thank you very much guys. i am good to go on ios. Now i’ll head towards Android from very beginning. i’ll be following @crittergorge’s tutorial as it is very detailed. Any advice or precautions i should consider?


#151

I’m getting the same error: “missing required architecture arm64”

I’m doing cocos gen-libs -p ios -m debug

I need the debug libs to actually read the console logs. With -m release works ok.


#152

Show me all the commands you have run please.

And what version of cocos2d-x?


#153

Cocos2d-x-3.12

For generating the release libs:

cocos gen-libs -p ios

To do the debug libs:

cocos gen-libs -p ios -m debug

The release ones works ok, the debug doesn’t.

[EDIT] System: macOS Sierra, Xcode 8.3


#154

if you are getting “missing required architecture arm64” for Debug, then before prebuilding libs, in cocos2d-x sources open build/cocos2d_libs.xcodeproj, go to cocos2s_libs project settings and in Build settings area look for “Build active architecture only” and change it from “Yes” to “No” for Debug configuration. For Release this is already set to “No”. And then rebuild libs.


#155

Hi everyone
i am using cocos2d-x v3.17 and cocos console 2.3
i am using cocos gen-libs -p android -m debug to generate prebuild library. but i am getting error.

Any help here?


#156

Clean maybe? empty build directory


#157

which directory?
i am making prebuild library not running or building any game project.


#158

can you post your errors as text and not an image, please?


#159

I used the 3.17 branch and android gen-libs worked for me.


#160

Here is the complete log for the result of cocos gen-libs -p android -m debug

mob_mb_c02m3e7wfd57_13_wifi:NepaliBarnamala_updated aqeeliqbal$ cocos gen-libs -p android -m debug
running: '/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/bin/cocos compile -s /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test -p android --ndk-mode debug --app-abi armeabi-v7a'

Building mode: debug
Using Android Studio project : /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android
Building apk...
running: '"/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/gradlew" --parallel --info assembleDebug -PPROP_APP_ABI=armeabi-v7a -PPROP_NDK_MODE=debug'

Initialized native services in: /Users/aqeeliqbal/.gradle/native
Found daemon DaemonInfo{pid=28532, address=[1cd13c79-7fe3-412a-9a67-9adebda30d81 port:53862, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1526463963247, context=DefaultDaemonContext[uid=b27459b9-4a7c-4504-b3cb-f0c3834ef726,javaHome=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home,daemonRegistryDir=/Users/aqeeliqbal/.gradle/daemon,pid=28532,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=PK,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home,daemonRegistryDir=/Users/aqeeliqbal/.gradle/daemon,pid=31308,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=b27459b9-4a7c-4504-b3cb-f0c3834ef726,javaHome=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home,daemonRegistryDir=/Users/aqeeliqbal/.gradle/daemon,pid=28532,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=PK,-Duser.language=en,-Duser.variant]

  Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 31219). The daemon log file: /Users/aqeeliqbal/.gradle/daemon/4.1/daemon-31219.out.log
Starting 2nd build in daemon [uptime: 17 mins 14.424 secs, performance: 100%, no major garbage collections]
Using 8 worker leases.
Creating new cache for fileHashes, path /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/.gradle/4.1/fileHashes/fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@1ab0062e
Creating new cache for plugin-use-metadata, path /Users/aqeeliqbal/.gradle/caches/4.1/plugin-resolution/plugin-use-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@16cc481b
Creating new cache for client-status, path /Users/aqeeliqbal/.gradle/caches/4.1/plugin-resolution/client-status.bin, access org.gradle.cache.internal.DefaultCacheAccess@16cc481b
Starting Build
Settings evaluated using settings file '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/settings.gradle'.
Projects loaded. Root project using build file '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/build.gradle'.
Included projects: [root project 'proj.android', project ':CppEmptyTest', project ':libcocos2dx']
Parallel execution is an incubating feature.

> Configure project :
Evaluating root project 'proj.android' using build file '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/build.gradle'.
Creating new cache for metadata-1.1/results, path /Users/aqeeliqbal/.gradle/caches/transforms-1/metadata-1.1/results.bin, access org.gradle.cache.internal.DefaultCacheAccess@4beeae51
Creating new cache for metadata-2.23/module-metadata, path /Users/aqeeliqbal/.gradle/caches/modules-2/metadata-2.23/module-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@40891d6d
Creating new cache for metadata-2.23/artifact-at-repository, path /Users/aqeeliqbal/.gradle/caches/modules-2/metadata-2.23/artifact-at-repository.bin, access org.gradle.cache.internal.DefaultCacheAccess@40891d6d

> Configure project :CppEmptyTest
Evaluating project ':CppEmptyTest' using build file '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/build.gradle'.
Creating configuration androidTestUtil
Creating configuration compile
Creating configuration apk
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 androidTestApk
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 testApk
Creating configuration testProvided
Creating configuration testApi
Creating configuration testImplementation
Creating configuration testRuntimeOnly
Creating configuration testCompileOnly
Creating configuration testWearApp
Creating configuration testAnnotationProcessor
Creating configuration debugCompile
Creating configuration debugApk
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 androidTestDebugApk
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 testDebugApk
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 releaseApk
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 testReleaseApk
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
SDK initialized in 11 ms
Using incremental javac compilation for :CppEmptyTest debug.
Using incremental javac compilation for :CppEmptyTest debugUnitTest.
Using incremental javac compilation for :CppEmptyTest release.
Using incremental javac compilation for :CppEmptyTest releaseUnitTest.
Using incremental javac compilation for :CppEmptyTest debugAndroidTest.

> Configure project :libcocos2dx
Evaluating project ':libcocos2dx' using build file '/Volumes/DATA/cocos2d-x/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
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
SDK initialized in 0 ms
Using incremental javac compilation for :libcocos2dx debug.
Using incremental javac compilation for :libcocos2dx debugUnitTest.
Using incremental javac compilation for :libcocos2dx release.
Using incremental javac compilation for :libcocos2dx releaseUnitTest.
Using incremental javac compilation for :libcocos2dx debugAndroidTest.

All projects evaluated.
Selected primary task 'assembleDebug' from project :
Creating new cache for annotation-processors, path /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/.gradle/4.1/fileContent/annotation-processors.bin, access org.gradle.cache.internal.DefaultCacheAccess@26f2cdd8
Tasks to be executed: [task ':CppEmptyTest:preBuild', task ':libcocos2dx:preBuild', task ':libcocos2dx:preDebugBuild', task ':libcocos2dx:checkDebugManifest', task ':libcocos2dx:processDebugManifest', task ':CppEmptyTest:preDebugBuild', task ':libcocos2dx:compileDebugAidl', task ':CppEmptyTest:compileDebugAidl', task ':libcocos2dx:packageDebugRenderscript', task ':CppEmptyTest:compileDebugRenderscript', task ':CppEmptyTest:checkDebugManifest', task ':CppEmptyTest:generateDebugBuildConfig', task ':CppEmptyTest:prepareLintJar', task ':CppEmptyTest:generateDebugResValues', task ':CppEmptyTest:generateDebugResources', task ':libcocos2dx:compileDebugRenderscript', task ':libcocos2dx:generateDebugResValues', task ':libcocos2dx:generateDebugResources', task ':libcocos2dx:packageDebugResources', task ':CppEmptyTest:mergeDebugResources', task ':CppEmptyTest:createDebugCompatibleScreenManifests', task ':CppEmptyTest:processDebugManifest', task ':CppEmptyTest:splitsDiscoveryTaskDebug', task ':libcocos2dx:platformAttrExtractor', task ':libcocos2dx:processDebugResources', task ':CppEmptyTest:processDebugResources', task ':CppEmptyTest:generateDebugSources', task ':libcocos2dx:generateDebugBuildConfig', task ':libcocos2dx:prepareLintJar', task ':libcocos2dx:generateDebugSources', task ':libcocos2dx:javaPreCompileDebug', task ':libcocos2dx:compileDebugJavaWithJavac', task ':libcocos2dx:processDebugJavaRes', task ':libcocos2dx:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug', task ':CppEmptyTest:javaPreCompileDebug', task ':CppEmptyTest:compileDebugJavaWithJavac', task ':CppEmptyTest:compileDebugNdk', task ':CppEmptyTest:compileDebugSources', task ':CppEmptyTest:mergeDebugShaders', task ':CppEmptyTest:compileDebugShaders', task ':CppEmptyTest:generateDebugAssets', task ':libcocos2dx:mergeDebugShaders', task ':libcocos2dx:compileDebugShaders', task ':libcocos2dx:generateDebugAssets', task ':libcocos2dx:mergeDebugAssets', task ':CppEmptyTest:mergeDebugAssets', task ':CppEmptyTest:transformClassesWithDexBuilderForDebug', task ':CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug', task ':CppEmptyTest:transformDexArchiveWithDexMergerForDebug', task ':CppEmptyTest:mergeDebugJniLibFolders', task ':libcocos2dx:compileDebugNdk', task ':libcocos2dx:mergeDebugJniLibFolders', task ':libcocos2dx:transformNativeLibsWithMergeJniLibsForDebug', task ':libcocos2dx:transformNativeLibsWithStripDebugSymbolForDebug', task ':libcocos2dx:transformNativeLibsWithIntermediateJniLibsForDebug', task ':CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug', task ':CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug', task ':CppEmptyTest:processDebugJavaRes', task ':CppEmptyTest:transformResourcesWithMergeJavaResForDebug', task ':CppEmptyTest:validateSigningDebug', task ':CppEmptyTest:packageDebug', task ':CppEmptyTest:assembleDebug', task ':libcocos2dx:extractDebugAnnotations', task ':libcocos2dx:mergeDebugConsumerProguardFiles', task ':libcocos2dx:transformResourcesWithMergeJavaResForDebug', task ':libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug', task ':libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug', task ':libcocos2dx:bundleDebug', task ':libcocos2dx:compileDebugSources', task ':libcocos2dx:assembleDebug']
Creating new cache for resourceHashesCache, path /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/.gradle/4.1/fileHashes/resourceHashesCache.bin, access org.gradle.cache.internal.DefaultCacheAccess@1ab0062e
Creating new cache for fileSnapshots, path /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/.gradle/4.1/taskHistory/fileSnapshots.bin, access org.gradle.cache.internal.DefaultCacheAccess@697ca5c3
Creating new cache for taskHistory, path /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/.gradle/4.1/taskHistory/taskHistory.bin, access org.gradle.cache.internal.DefaultCacheAccess@697ca5c3
:CppEmptyTest:preBuild (Thread[Task worker for ':',5,main]) started.
:libcocos2dx:preBuild (Thread[Task worker for ':' Thread 2,5,main]) started.

> Task :CppEmptyTest:generateDebugAssets
Skipping task ':CppEmptyTest:generateDebugAssets' as it has no actions.

:CppEmptyTest:generateDebugAssets (Thread[Task worker for ':',5,main]) completed. Took 0.001 secs.

> Task :libcocos2dx:compileDebugJavaWithJavac
Putting task artifact state for task ':libcocos2dx:compileDebugJavaWithJavac' into context took 0.0 secs.
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/cocos/platform/android/libcocos2dx/src/main/java', not found
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/cocos/platform/android/libcocos2dx/src/main/java', not found
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/cocos/platform/android/libcocos2dx/src/debug/java', not found
Skipping task ':libcocos2dx:compileDebugJavaWithJavac' as it is up-to-date (took 0.009 secs).

:CppEmptyTest:mergeDebugJniLibFolders (Thread[Task worker for ':',5,main]) started.
:libcocos2dx:compileDebugJavaWithJavac (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.011 secs.
:libcocos2dx:processDebugJavaRes (Thread[Task worker for ':' Thread 6,5,main]) started.

> Task :libcocos2dx:processDebugJavaRes
Putting task artifact state for task ':libcocos2dx:processDebugJavaRes' into context took 0.0 secs.
Skipping task ':libcocos2dx:processDebugJavaRes' as it has no source files and no previous output files.

:libcocos2dx:processDebugJavaRes (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.0 secs.
:libcocos2dx:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug (Thread[Task worker for ':' Thread 6,5,main]) started.

> Task :CppEmptyTest:mergeDebugJniLibFolders
Putting task artifact state for task ':CppEmptyTest:mergeDebugJniLibFolders' into context took 0.0 secs.
Skipping task ':CppEmptyTest:mergeDebugJniLibFolders' as it is up-to-date (took 0.001 secs).

:CppEmptyTest:mergeDebugJniLibFolders (Thread[Task worker for ':',5,main]) completed. Took 0.002 secs.

> Task :libcocos2dx:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
Putting task artifact state for task ':libcocos2dx:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug' into context took 0.001 secs.
Skipping task ':libcocos2dx:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug' as it is up-to-date (took 0.0 secs).

:CppEmptyTest:processDebugJavaRes (Thread[Daemon worker Thread 2,5,main]) started.
:libcocos2dx:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.002 secs.
:libcocos2dx:mergeDebugShaders (Thread[Task worker for ':' Thread 6,5,main]) started.

> Task :CppEmptyTest:processDebugJavaRes
Putting task artifact state for task ':CppEmptyTest:processDebugJavaRes' into context took 0.0 secs.
Skipping task ':CppEmptyTest:processDebugJavaRes' as it has no source files and no previous output files.

:CppEmptyTest:processDebugJavaRes (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.001 secs.
:CppEmptyTest:javaPreCompileDebug (Thread[Daemon worker Thread 2,5,main]) started.

> Task :libcocos2dx:mergeDebugShaders
Putting task artifact state for task ':libcocos2dx:mergeDebugShaders' into context took 0.0 secs.
Skipping task ':libcocos2dx:mergeDebugShaders' as it is up-to-date (took 0.001 secs).

:libcocos2dx:mergeDebugShaders (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.002 secs.
:libcocos2dx:compileDebugShaders (Thread[Task worker for ':' Thread 6,5,main]) started.

> Task :libcocos2dx:extractDebugAnnotations
Putting task artifact state for task ':libcocos2dx:extractDebugAnnotations' into context took 0.0 secs.
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/cocos/platform/android/libcocos2dx/src/main/java', not found
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/cocos/platform/android/libcocos2dx/src/main/java', not found
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/cocos/platform/android/libcocos2dx/src/debug/java', not found
Skipping task ':libcocos2dx:extractDebugAnnotations' as it is up-to-date (took 0.013 secs).

:libcocos2dx:extractDebugAnnotations (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.015 secs.
:libcocos2dx:mergeDebugConsumerProguardFiles (Thread[Task worker for ':' Thread 6,5,main]) started.

> Task :libcocos2dx:mergeDebugConsumerProguardFiles
Putting task artifact state for task ':libcocos2dx:mergeDebugConsumerProguardFiles' into context took 0.0 secs.
Skipping task ':libcocos2dx:mergeDebugConsumerProguardFiles' as it is up-to-date (took 0.0 secs).

:libcocos2dx:mergeDebugConsumerProguardFiles (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.0 secs.
:libcocos2dx:transformResourcesWithMergeJavaResForDebug (Thread[Task worker for ':' Thread 6,5,main]) started.

> Task :libcocos2dx:transformResourcesWithMergeJavaResForDebug
Putting task artifact state for task ':libcocos2dx:transformResourcesWithMergeJavaResForDebug' into context took 0.0 secs.
Skipping task ':libcocos2dx:transformResourcesWithMergeJavaResForDebug' as it is up-to-date (took 0.005 secs).

:libcocos2dx:transformResourcesWithMergeJavaResForDebug (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.007 secs.
:libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug (Thread[Task worker for ':' Thread 6,5,main]) started.

> Task :libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug
Putting task artifact state for task ':libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug' into context took 0.001 secs.
Skipping task ':libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug' as it is up-to-date (took 0.007 secs).

:libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.008 secs.
:libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug (Thread[Task worker for ':' Thread 6,5,main]) started.

> Task :libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug
Putting task artifact state for task ':libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug' into context took 0.0 secs.
Skipping task ':libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug' as it is up-to-date (took 0.001 secs).

:libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.001 secs.
:libcocos2dx:bundleDebug (Thread[Task worker for ':' Thread 6,5,main]) started.

> Task :CppEmptyTest:transformClassesWithDexBuilderForDebug
Putting task artifact state for task ':CppEmptyTest:transformClassesWithDexBuilderForDebug' into context took 0.0 secs.
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs', not found
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs', not found
Skipping task ':CppEmptyTest:transformClassesWithDexBuilderForDebug' as it is up-to-date (took 0.005 secs).

:CppEmptyTest:transformClassesWithDexBuilderForDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.005 secs.
:CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug (Thread[Daemon worker Thread 2,5,main]) started.

> Task :CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug
Putting task artifact state for task ':CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug' into context took 0.0 secs.
Skipping task ':CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug' as it is up-to-date (took 0.003 secs).

:CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.004 secs.
:CppEmptyTest:transformDexArchiveWithDexMergerForDebug (Thread[Daemon worker Thread 2,5,main]) started.

> Task :CppEmptyTest:transformDexArchiveWithDexMergerForDebug
Putting task artifact state for task ':CppEmptyTest:transformDexArchiveWithDexMergerForDebug' into context took 0.0 secs.
Skipping task ':CppEmptyTest:transformDexArchiveWithDexMergerForDebug' as it is up-to-date (took 0.002 secs).

:CppEmptyTest:transformDexArchiveWithDexMergerForDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.002 secs.
:CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug (Thread[Daemon worker Thread 2,5,main]) started.

> Task :CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug
Putting task artifact state for task ':CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug' into context took 0.0 secs.
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs', not found
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs', not found
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs', not found
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs', not found
Skipping task ':CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug' as it is up-to-date (took 0.005 secs).

:CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.007 secs.
:CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug (Thread[Daemon worker Thread 2,5,main]) started.

> Task :CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug
Putting task artifact state for task ':CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug' into context took 0.0 secs.
Skipping task ':CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug' as it is up-to-date (took 0.003 secs).

:CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.003 secs.
:CppEmptyTest:transformResourcesWithMergeJavaResForDebug (Thread[Daemon worker Thread 2,5,main]) started.

> Task :CppEmptyTest:transformResourcesWithMergeJavaResForDebug
Putting task artifact state for task ':CppEmptyTest:transformResourcesWithMergeJavaResForDebug' into context took 0.0 secs.
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs', not found
file or directory '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs', not found
Skipping task ':CppEmptyTest:transformResourcesWithMergeJavaResForDebug' as it is up-to-date (took 0.046 secs).

:CppEmptyTest:transformResourcesWithMergeJavaResForDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.046 secs.
:CppEmptyTest:validateSigningDebug (Thread[Daemon worker Thread 2,5,main]) started.

> Task :CppEmptyTest:validateSigningDebug
Putting task artifact state for task ':CppEmptyTest:validateSigningDebug' into context took 0.0 secs.
Executing task ':CppEmptyTest:validateSigningDebug' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.

:CppEmptyTest:validateSigningDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.001 secs.
:CppEmptyTest:packageDebug (Thread[Daemon worker Thread 2,5,main]) started.

> Task :CppEmptyTest:packageDebug
Putting task artifact state for task ':CppEmptyTest:packageDebug' into context took 0.0 secs.
Skipping task ':CppEmptyTest:packageDebug' as it is up-to-date (took 0.049 secs).

:CppEmptyTest:packageDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.054 secs.
:CppEmptyTest:assembleDebug (Thread[Daemon worker Thread 2,5,main]) started.

> Task :CppEmptyTest:assembleDebug
Skipping task ':CppEmptyTest:assembleDebug' as it has no actions.

:CppEmptyTest:assembleDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.001 secs.

BUILD SUCCESSFUL in 1s
52 actionable tasks: 2 executed, 50 up-to-date
Move apk to /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/bin/debug/android
Build succeed.
Traceback (most recent call last):
  File "/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 1072, in <module>
    run_plugin(command, argv, plugins)
  File "/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 961, in run_plugin
    plugin.run(argv, dependencies_objects)
  File "/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/gen_libs.py", line 79, in run
    self.compile()
  File "/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/gen_libs.py", line 176, in compile
    self.compile_android()
  File "/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/gen_libs.py", line 368, in compile_android
    cocos.copy_files_with_config(copy_cfg, obj_dir, android_out_dir)
  File "/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 799, in copy_files_with_config
    src_dir, src_dir, dst_dir, include_rules, exclude_rules)
  File "/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 818, in copy_files_with_rules
    for name in os.listdir(src):
OSError: [Errno 2] No such file or directory: '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a'

#161
cocos2d-x/tests/cpp-empty-test/proj.android/app/build
cocos2d-x/tests/cpp-empty-test/proj.android/build

These are build directories in my case for gen-libs.


#162

i cleaned the directories but same result.


#163

What branch are you using?


#164

v3.17
i guess the default brach that i can download with clone command.
git clone https://github.com/cocos2d/cocos2d-x.git


#165

3.17 works for me on 3 machines.


#166

i tried again cocos gen-libs
it created ios and mac libs but again showing these errors :

Task :libcocos2dx:extractDebugAnnotations
Putting task artifact state for task ‘:libcocos2dx:extractDebugAnnotations’ into context took 0.0 secs.
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/cocos/platform/android/libcocos2dx/src/main/java’, not found
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/cocos/platform/android/libcocos2dx/src/main/java’, not found
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/cocos/platform/android/libcocos2dx/src/debug/java’, not found
Skipping task ‘:libcocos2dx:extractDebugAnnotations’ as it is up-to-date (took 0.022 secs).

:libcocos2dx:extractDebugAnnotations (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.024 secs.
:libcocos2dx:mergeDebugConsumerProguardFiles (Thread[Task worker for ‘:’ Thread 2,5,main]) started.

Task :libcocos2dx:mergeDebugConsumerProguardFiles
Putting task artifact state for task ‘:libcocos2dx:mergeDebugConsumerProguardFiles’ into context took 0.001 secs.
Skipping task ‘:libcocos2dx:mergeDebugConsumerProguardFiles’ as it is up-to-date (took 0.001 secs).

:libcocos2dx:mergeDebugConsumerProguardFiles (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.002 secs.
:libcocos2dx:transformResourcesWithMergeJavaResForDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) started.

Task :libcocos2dx:transformResourcesWithMergeJavaResForDebug
Putting task artifact state for task ‘:libcocos2dx:transformResourcesWithMergeJavaResForDebug’ into context took 0.0 secs.
Skipping task ‘:libcocos2dx:transformResourcesWithMergeJavaResForDebug’ as it is up-to-date (took 0.007 secs).

:libcocos2dx:transformResourcesWithMergeJavaResForDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.008 secs.
:libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) started.

Task :libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug
Putting task artifact state for task ‘:libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug’ into context took 0.001 secs.
Skipping task ‘:libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug’ as it is up-to-date (took 0.015 secs).

:libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.017 secs.
:libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) started.

Task :libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug
Putting task artifact state for task ‘:libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug’ into context took 0.0 secs.
Skipping task ‘:libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug’ as it is up-to-date (took 0.003 secs).

:libcocos2dx:transformNativeLibsWithSyncJniLibsForDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.005 secs.
:libcocos2dx:bundleDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) started.

Task :libcocos2dx:bundleDebug
Putting task artifact state for task ‘:libcocos2dx:bundleDebug’ into context took 0.0 secs.
Skipping task ‘:libcocos2dx:bundleDebug’ as it is up-to-date (took 0.003 secs).

:libcocos2dx:bundleDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.006 secs.
:libcocos2dx:compileDebugSources (Thread[Task worker for ‘:’ Thread 2,5,main]) started.

Task :libcocos2dx:compileDebugSources
Skipping task ‘:libcocos2dx:compileDebugSources’ as it has no actions.

:libcocos2dx:compileDebugSources (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.001 secs.
:libcocos2dx:assembleDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) started.

Task :libcocos2dx:assembleDebug
Skipping task ‘:libcocos2dx:assembleDebug’ as it has no actions.

:libcocos2dx:assembleDebug (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.001 secs.

Task :CppEmptyTest:mergeDebugAssets
Putting task artifact state for task ‘:CppEmptyTest:mergeDebugAssets’ into context took 0.001 secs
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found
Executing task ‘:CppEmptyTest:mergeDebugAssets’ (up-to-date check took 0.014 secs) due to:
Output property ‘outputDir’ file /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/build/intermediates/assets/debug has changed.
Output property ‘outputDir’ file /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/build/intermediates/assets/debug/bang.png has been removed.
Output property ‘outputDir’ file /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/build/intermediates/assets/debug/fonts has been removed.
All input files are considered out-of-date for incremental task ‘:CppEmptyTest:mergeDebugAssets’.
Unable do incremental execution: full task run
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found

:CppEmptyTest:mergeDebugAssets (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 0.263 secs.
:CppEmptyTest:transformClassesWithDexBuilderForDebug (Thread[Task worker for ‘:’ Thread 3,5,main]) started.

Task :CppEmptyTest:transformClassesWithDexBuilderForDebug
Putting task artifact state for task ‘:CppEmptyTest:transformClassesWithDexBuilderForDebug’ into context took 0.007 secs.
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found
Skipping task ‘:CppEmptyTest:transformClassesWithDexBuilderForDebug’ as it is up-to-date (took 0.015 secs).

:CppEmptyTest:transformClassesWithDexBuilderForDebug (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 0.024 secs.
:CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug (Thread[Task worker for ‘:’ Thread 3,5,main]) started.

Task :CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug
Putting task artifact state for task ‘:CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug’ into context took 0.001 secs.
Skipping task ‘:CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug’ as it is up-to-date (took 0.005 secs).

:CppEmptyTest:transformDexArchiveWithExternalLibsDexMergerForDebug (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 0.007 secs.
:CppEmptyTest:transformDexArchiveWithDexMergerForDebug (Thread[Task worker for ‘:’ Thread 3,5,main]) started.

Task :CppEmptyTest:transformDexArchiveWithDexMergerForDebug
Putting task artifact state for task ‘:CppEmptyTest:transformDexArchiveWithDexMergerForDebug’ into context took 0.001 secs.
Skipping task ‘:CppEmptyTest:transformDexArchiveWithDexMergerForDebug’ as it is up-to-date (took 0.016 secs).

:CppEmptyTest:transformDexArchiveWithDexMergerForDebug (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 0.018 secs.
:CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug (Thread[Task worker for ‘:’ Thread 3,5,main]) started.

Task :CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug
Putting task artifact state for task ‘:CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug’ into context took 0.001 secs.
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found
Skipping task ‘:CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug’ as it is up-to-date (took 0.023 secs).

:CppEmptyTest:transformNativeLibsWithMergeJniLibsForDebug (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 0.024 secs.
:CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug (Thread[Task worker for ‘:’,5,main]) started.

Task :CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug
Putting task artifact state for task ‘:CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug’ into context took 0.001 secs.
Skipping task ‘:CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug’ as it is up-to-date (took 0.002 secs).

:CppEmptyTest:transformNativeLibsWithStripDebugSymbolForDebug (Thread[Task worker for ‘:’,5,main]) completed. Took 0.004 secs.
:CppEmptyTest:transformResourcesWithMergeJavaResForDebug (Thread[Task worker for ‘:’,5,main]) started.

Task :CppEmptyTest:transformResourcesWithMergeJavaResForDebug
Putting task artifact state for task ‘:CppEmptyTest:transformResourcesWithMergeJavaResForDebug’ into context took 0.001 secs.
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found
file or directory ‘/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/libs’, not found
Skipping task ‘:CppEmptyTest:transformResourcesWithMergeJavaResForDebug’ as it is up-to-date (took 0.019 secs).

:CppEmptyTest:transformResourcesWithMergeJavaResForDebug (Thread[Task worker for ‘:’,5,main]) completed. Took 0.021 secs.
:CppEmptyTest:packageDebug (Thread[Task worker for ‘:’,5,main]) started.

Task :CppEmptyTest:packageDebug
Putting task artifact state for task ‘:CppEmptyTest:packageDebug’ into context took 0.001 secs.
Skipping task ‘:CppEmptyTest:packageDebug’ as it is up-to-date (took 0.035 secs).

:CppEmptyTest:packageDebug (Thread[Task worker for ‘:’,5,main]) completed. Took 0.047 secs.
:CppEmptyTest:assembleDebug (Thread[Task worker for ‘:’,5,main]) started.

Task :CppEmptyTest:assembleDebug
Skipping task ‘:CppEmptyTest:assembleDebug’ as it has no actions.

:CppEmptyTest:assembleDebug (Thread[Task worker for ‘:’,5,main]) completed. Took 0.001 secs.

BUILD SUCCESSFUL in 9s
52 actionable tasks: 2 executed, 50 up-to-date
Move apk to /Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/bin/debug/android
Build succeed.
Traceback (most recent call last):
File “/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/bin/cocos.py”, line 1072, in
run_plugin(command, argv, plugins)
File “/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/bin/cocos.py”, line 961, in run_plugin
plugin.run(argv, dependencies_objects)
File “/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/gen_libs.py”, line 79, in run
self.compile()
File “/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/gen_libs.py”, line 176, in compile
self.compile_android()
File “/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/gen_libs.py”, line 368, in compile_android
cocos.copy_files_with_config(copy_cfg, obj_dir, android_out_dir)
File “/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/bin/cocos.py”, line 799, in copy_files_with_config
src_dir, src_dir, dst_dir, include_rules, exclude_rules)
File “/Volumes/DATA/cocos2d-x/cocos2d-x/tools/cocos2d-console/bin/cocos.py”, line 818, in copy_files_with_rules
for name in os.listdir(src):
OSError: [Errno 2] No such file or directory: '/Volumes/DATA/cocos2d-x/cocos2d-x/tests/cpp-empty-test/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a