Broken Android build process

I use Creator 3.8.0 and for some reason, for last couple of days, when I’m trying to build native Android app, after “Build” step, there’s no files in ‘build\android\data\src\cocos-js’. Make step works fine, but after that I have broken APK which shows only black screen, because it couldn’t load ‘src\cocos-js\cc.js’.
I tried turning on “MD5 Cache” Build option and then I got error
‘’[Assets] ENOENT: no such file or directory, rename ‘[PROJECT_PATH]\build\android\data\src\cocos-js\cc.js’ → ‘[PROJECT_PATH]\build\android\data\src\cocos-js\cc.d41d8.js’

How can I solve this problem?

Also build works fine, if I turn on “Debug” option

Resolved for now by upgrading engine to 3.8.1

It happened again. Now even in Debug build, after launching an app it doesn’t load, and there is error in logcat

02-05 12:52:14.850 28268 28389 E Cocos : 12:52:14 [ERROR]: E/ ScriptEngine::evalString catch exception:
02-05 12:52:14.850 28268 28389 E Cocos :
02-05 12:52:14.851 28268 28389 E Cocos : 12:52:14 [ERROR]: E/ ERROR: Uncaught Error: Failed to require file ‘src/cocos-js/cc.js’, not found!, location: (no filename):0:0
02-05 12:52:14.851 28268 28389 E Cocos : STACK:
02-05 12:52:14.851 28268 28389 E Cocos : - [0]anonymous@(no filename):1
02-05 12:52:14.851 28268 28389 E Cocos : - [1]defaultHandler@main.js:13
02-05 12:52:14.851 28268 28389 E Cocos : - [2]anonymous@src/system.bundle.js:706
02-05 12:52:14.851 28268 28389 E Cocos : - [3]anonymous@src/system.bundle.js:734
02-05 12:52:14.851 28268 28389 E Cocos : - [4]anonymous@src/system.bundle.js:287
02-05 12:52:14.851 28268 28389 E Cocos :
02-05 12:52:14.851 28268 28389 E Cocos : 12:52:14 [ERROR]: [ERROR] file F:/CocosEditors/Creator/3.8.1/resources/resources/3d/engine/native/cocos/application/CocosApplication.cpp: line 173
02-05 12:52:14.851 28268 28389 E Cocos : 12:52:14 [ERROR]:
02-05 12:52:14.851 28268 28389 E Cocos : Uncaught Exception:
02-05 12:52:14.851 28268 28389 E Cocos : - location : (see stack)
02-05 12:52:14.851 28268 28389 E Cocos : - msg : Uncaught Error: Failed to require file ‘src/cocos-js/cc.js’, not found!
02-05 12:52:14.851 28268 28389 E Cocos : - detail :
02-05 12:52:14.851 28268 28389 E Cocos : - [0]anonymous@(no filename):1
02-05 12:52:14.851 28268 28389 E Cocos : - [1]defaultHandler@main.js:13
02-05 12:52:14.851 28268 28389 E Cocos : - [2]anonymous@src/system.bundle.js:706
02-05 12:52:14.851 28268 28389 E Cocos : - [3]anonymous@src/system.bundle.js:734
02-05 12:52:14.851 28268 28389 E Cocos : - [4]anonymous@src/system.bundle.js:287
02-05 12:52:14.851 28268 28389 E Cocos :
02-05 12:52:14.851 28268 28389 E Cocos : 12:52:14 [ERROR]: E/ ScriptEngine::evalString script (no filename), failed!
02-05 12:52:14.851 28268 28389 E Cocos :
02-05 12:52:14.851 28268 28389 E Cocos : 12:52:14 [ERROR]: E/ [ERROR] Failed to invoke require
02-05 12:52:14.851 28268 28389 E Cocos :
02-05 12:52:14.852 28268 28389 E Cocos : 12:52:14 [ERROR]: JS: Error: Module no-schema:/src/cocos-js/cc.js did not instantiate (SystemJS Error#2 systemjs/docs/errors.md at main · systemjs/systemjs · GitHub), stack: Error: Module no-schema:/src/cocos-js/cc.js did not instantiate (SystemJS Error#2 systemjs/docs/errors.md at main · systemjs/systemjs · GitHub)
02-05 12:52:14.852 28268 28389 E Cocos : at src/system.bundle.js:291:15

I definitely haven’t changed anything in an engine or in a build settings.

And now web-mobile build is broken too

08.02.2024 12:17:25-debug: // ---- build task Add md5 suffix to assets ----
08.02.2024 12:17:25-error: readFile {link([project]\build\tg-debug\cocos-js\cc.js)}
08.02.2024 12:17:25-error: Error: ENOENT: no such file or directory, open ‘[project]\build\tg-debug\cocos-js\cc.js’
08.02.2024 12:17:25-debug: [Build Memory track]: Add md5 suffix to assets start:312.71MB, end 312.85MB, increase: 146.99KB
08.02.2024 12:17:25-debug: run build task Add md5 suffix to assets failed!36%
08.02.2024 12:17:25-debug: [Build Memory track]: builder:build-project-total start:315.98MB, end 312.87MB, increase: -3186.82KB
08.02.2024 12:17:25-log: Asset DB is resume!
08.02.2024 12:17:26-debug: builder:build-project-total (36377ms)
08.02.2024 12:17:26-debug: build success in 36377 ms!
08.02.2024 12:17:26-error: Error: ENOENT: no such file or directory, rename ‘[project]\build\tg-debug\cocos-js\cc.js’ → ‘[project]\build\tg-debug\cocos-js\cc.d41d8.js’
08.02.2024 12:17:26-debug: ================================ build Task (tg-debug) Finished in (36498)ms ================================

Is there a way to prevent this? Or somehow make a clean build of an engine. This issue blocks my work.

I had the same problem with web-mobile in 3.8.1…in 3.8.2 this problem has not yet arisen…try clearing the cache before building:
CocosCreator_sv3ZEVGfVH

It seems to me that in 3.8.2 the missing cc.js file was fixed.

Addition. Yes, this was apparently fixed in 3.8.2. Now it simply writes:

and everything is being built, apparently, anew.

Thanks! I managed to solve my problem by removing all existing builds and making new ones for now, but if it happens again, I’ll update to 3.8.2