- Lag.
- Cant MultiThread.
- Android Studio version:
Iguana | 2023.2.1 Canary 16 for Windows
. - Download link: Android Studio.
- Example code: demo.
- Current WebView version: 120.0.6076.4.
- Do not modify classes or functions with the
@JNINamespace
or@CalledByNative
annotations.
- Create
structure.json
that includes only the necessary files. - I'm trying to remove as many unnecessary files as possible.
- That will minimize errors that I cannot fix it🫣.
- “
If there are somethings that u cant fix it, just delete it”
-
If you are using Intel Core then you can use Ubuntu.
-
Else if you are using Ryzen Core then you can use Debian (because Ryzen has no wifi driver 😐).
-
You can follow this docs.
-
After running
gclient sync
, you can set chromium version.git checkout tags/120.0.6076.4 gclient sync
-
And config
out/$abi/args.gn
like this:# Set build arguments here. See gn help buildargs. target_os = "android" target_cpu = "arm64" symbol_level = 0 blink_symbol_level = 0 v8_symbol_level = 0 is_debug = false is_java_debug = false is_clang = true fatal_linker_warnings = false treat_warnings_as_errors = false clang_use_chrome_plugins = false enable_nacl = false enable_iterator_debugging = false enable_remoting = false use_thin_lto = true use_debug_fission = false dcheck_always_on = false update_android_aar_prebuilts = true proprietary_codecs = true ffmpeg_branding = "Chrome"
-
You can find the available
target_cpu
information in this link. -
Then open terminal and
cd chromium/src
then runautoninja -C out/$abi -j11 webview_instrumentation_apk
to start build. -
Note:
$abi
can be any name you prefer when runninggn gen out/$abi
, it's just the folder name.- The option
-j11
means that only use 11 / 12 threads because nobody wants their PC running at 100% CPU usage, yet? - Also, you'll need approximately
30GB
of RAM for a successful build if you want to avoid it being terminated due to running out of RAM.
-
After build successfully, you can run
tools/blind_copy.py
to copy resources like shared object or layout, style, image, ... -
Then run
tools/path2java.py
to take only necessary Java files.