When I run on clean project thru console compile : cocos run -p android -j 4 --android-studio -m release
I get following error:
Execution failed for task ‘:MyCoolGame:externalNativeBuildRelease’.
java.io.FileNotFoundException: /Users/macbook/Documents/cocos_projects/MyCoolGame/proj.android-studio/app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json (No such file or directory)
@yinjimmy@nite@slackmoehrle
If before running console command I start project in android-studio - it caching some files and then console works. Is there some incompatibility for Latest Gradle version and Cocos2d-x compile console, could you please make it clear?
I would suggest to call in the folder /Users/macbook/Documents/cocos_projects/MyCoolGame/proj.android-studio/ the command ./gradlew clean build. Sometimes the gradle cache is broken after updating versions (or switching branches). After that your cocos console should run without problems, I hope.
for clean it could work, but as we using cloud compile it will be to long compile if we make clean before each build, so we need some command which we can run before every build to make sure we not face that error or maybe it should be fixed on cocos console level
but I make already clean build, I deleting “build” folders and “.externalndkbuild” folders to make sure it fully recompiled and then by some reason cocos or gradle looking for that file: android_gradle_build.json inside not existing folder
If I make compile in android-studio it generating that file there and after I can run console
direct command seems to work, also as I’m changed build tools to 27.0.3 maybe there is incompability also in gradle files, because Im getting such warnings:
Configuration 'compile' in project ':libcocos2dx' is deprecated. Use 'implementation' instead.