Cannot build for Android cocos 2.0.7

Cannot build for Android cocos 2.0.7
0

#1

Using cocos creator 2.0.7
Build command failed.

Building mode: debug
Using Android Studio project : D:\Projects\Mobile\PopcornPop\build\jsb-link\frameworks\runtime-src\proj.android-studio
Building apk…
running: ‘“D:\Projects\Mobile\PopcornPop\build\jsb-link\frameworks\runtime-src\proj.android-studio\gradlew.bat” --parallel --info assembleDebug’

Initialized native services in: C:\Users\andre.gradle\native
Found daemon DaemonInfo{pid=17788, address=[02fd80b7-ccec-4fb0-b742-ff021bec79dc port:56615, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1549047706796, context=DefaultDaemonContext[uid=0a7d2fbc-96fe-4a5e-a1c5-d439b65dec49,javaHome=C:\Program Files\Android\Android Studio\jre,daemonRegistryDir=C:\Users\andre.gradle\daemon,pid=17788,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\NVPACK\jdk1.8.0_77,daemonRegistryDir=C:\Users\andre.gradle\daemon,pid=12688,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=0a7d2fbc-96fe-4a5e-a1c5-d439b65dec49,javaHome=C:\Program Files\Android\Android Studio\jre,daemonRegistryDir=C:\Users\andre.gradle\daemon,pid=17788,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]

Looking for a different daemon…
Removing 0 daemon stop events from registry
Previous Daemon (20620) stopped at Fri Feb 01 15:15:00 CLT 2019 stop command received
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Starting process ‘Gradle build daemon’. Working directory: C:\Users\andre.gradle\daemon\4.4 Command: C:\NVPACK\jdk1.8.0_77\bin\java.exe -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\andre.gradle\wrapper\dists\gradle-4.4-all\4th6d42q1kgladv9hkn2iehgi5\gradle-4.4\lib\gradle-launcher-4.4.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 4.4
Successfully started process ‘Gradle build daemon’
An attempt to start the daemon took 33.632 secs.
The client will now receive all logging from the daemon (pid: 19984). The daemon log file: C:\Users\andre.gradle\daemon\4.4\daemon-19984.out.log
Starting build in new daemon [memory: 954.7 MB]
Using 8 worker leases.
Creating new cache for fileHashes, path C:\Users\andre.gradle\caches\4.4\fileHashes\fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@76aa4583
Creating new cache for resourceHashesCache, path C:\Users\andre.gradle\caches\4.4\fileHashes\resourceHashesCache.bin, access org.gradle.cache.internal.DefaultCacheAccess@76aa4583
Creating new cache for fileHashes, path D:\Projects\Mobile\PopcornPop\build\jsb-link\frameworks\runtime-src\proj.android-studio.gradle\4.4\fileHashes\fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@5c19b638
Starting Build
Settings evaluated using settings file ‘D:\Projects\Mobile\PopcornPop\build\jsb-link\frameworks\runtime-src\proj.android-studio\settings.gradle’.
Projects loaded. Root project using build file ‘D:\Projects\Mobile\PopcornPop\build\jsb-link\frameworks\runtime-src\proj.android-studio\build.gradle’.
Included projects: [root project ‘proj.android-studio’, project ‘:PopcornPop’, project ‘:libcocos2dx’]
Parallel execution is an incubating feature.
Evaluating root project ‘proj.android-studio’ using build file ‘D:\Projects\Mobile\PopcornPop\build\jsb-link\frameworks\runtime-src\proj.android-studio\build.gradle’.
Creating new cache for metadata-1.1/results, path C:\Users\andre.gradle\caches\transforms-1\metadata-1.1\results.bin, access org.gradle.cache.internal.DefaultCacheAccess@74749b7b
Creating new cache for metadata-2.36/module-metadata, path C:\Users\andre.gradle\caches\modules-2\metadata-2.36\module-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@472c7c80
Creating new cache for metadata-2.36/module-artifact, path C:\Users\andre.gradle\caches\modules-2\metadata-2.36\module-artifact.bin, access org.gradle.cache.internal.DefaultCacheAccess@472c7c80
Evaluating project ‘:PopcornPop’ using build file ‘D:\Projects\Mobile\PopcornPop\build\jsb-link\frameworks\runtime-src\proj.android-studio\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
WARNING: Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ and ‘api’.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Parsing the SDK, no caching allowed
Parsing C:\NVPACK\android-sdk-windows\build-tools\26.0.1\package.xml
Parsing C:\NVPACK\android-sdk-windows\build-tools\27.0.3\package.xml
Parsing C:\NVPACK\android-sdk-windows\build-tools\28.0.3\package.xml
Parsing C:\NVPACK\android-sdk-windows\emulator\package.xml
Parsing C:\NVPACK\android-sdk-windows\extras\android\m2repository\package.xml
Parsing C:\NVPACK\android-sdk-windows\extras\android\support\package.xml
Parsing C:\NVPACK\android-sdk-windows\extras\google\m2repository\package.xml
Parsing C:\NVPACK\android-sdk-windows\extras\google\usb_driver\package.xml
Parsing C:\NVPACK\android-sdk-windows\extras\intel\Hardware_Accelerated_Execution_Manager\package.xml
Parsing C:\NVPACK\android-sdk-windows\patcher\v4\package.xml
Parsing C:\NVPACK\android-sdk-windows\platform-tools\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-19\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-20\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-21\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-22\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-23\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-24\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-25\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-26\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-27\package.xml
Parsing C:\NVPACK\android-sdk-windows\platforms\android-28\package.xml
Parsing C:\NVPACK\android-sdk-windows\sources\android-25\package.xml
Parsing C:\NVPACK\android-sdk-windows\sources\android-27\package.xml
Parsing C:\NVPACK\android-sdk-windows\sources\android-28\package.xml
Parsing C:\NVPACK\android-sdk-windows\system-images\android-28\android-tv\x86\package.xml
Parsing C:\NVPACK\android-sdk-windows\system-images\android-28\android-wear\x86\package.xml
Parsing C:\NVPACK\android-sdk-windows\system-images\android-28\default\x86\package.xml
Parsing C:\NVPACK\android-sdk-windows\system-images\android-28\default\x86_64\package.xml
Parsing C:\NVPACK\android-sdk-windows\system-images\android-28\google_apis\x86\package.xml
Parsing C:\NVPACK\android-sdk-windows\system-images\android-28\google_apis\x86_64\package.xml
Parsing C:\NVPACK\android-sdk-windows\system-images\android-28\google_apis_playstore\x86\package.xml
Parsing C:\NVPACK\android-sdk-windows\system-images\android-28\google_apis_playstore\x86_64\package.xml
Parsing C:\NVPACK\android-sdk-windows\tools\package.xml
SDK initialized in 1875 ms
Using incremental javac compilation for :PopcornPop debug.
Using incremental javac compilation for :PopcornPop debugUnitTest.
Using incremental javac compilation for :PopcornPop release.
Using incremental javac compilation for :PopcornPop releaseUnitTest.
Using incremental javac compilation for :PopcornPop debugAndroidTest.
Evaluating project ‘:libcocos2dx’ using build file ‘D:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build.gradle’.
All projects evaluated.
Selected primary task ‘assembleDebug’ from project :
Creating new cache for annotation-processors, path D:\Projects\Mobile\PopcornPop\build\jsb-link\frameworks\runtime-src\proj.android-studio.gradle\4.4\fileContent\annotation-processors.bin, access org.gradle.cache.internal.DefaultCacheAccess@6c3dae57

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:PopcornPop:compileDebugJavaWithJavac’.

Could not resolve all task dependencies for configuration ‘:PopcornPop:debugCompileClasspath’.
Could not resolve project :libcocos2dx.
Required by:
project :PopcornPop
Unable to find a matching configuration of project :libcocos2dx: None of the consumable configurations have attributes.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 28s
Error running command, return code: 1.


#2

Hi,You can try replacing the ndk file with version R16.