how to generate R.class

87 views
Skip to first unread message

heh...@sohu.com

unread,
Jul 30, 2025, 9:40:39 AMJul 30
to Chromium-dev
HI
i am developing custom webview aar.Currently, I can generate R.java from android_sources.
aar is built from dist_aar and android_sources is depended from android_library in dist_aar deps.how to generate R.class without android_apk cmd in above situation(deps case).

Thomas Chaar

unread,
Aug 3, 2025, 12:48:51 AMAug 3
to Chromium-dev, heh...@sohu.com

Yyt

I O

unread,
Dec 5, 2025, 12:41:51 AM (7 days ago) Dec 5
to Chromium-dev, Thomas Chaar, heh...@sohu.com
Hi,
You'd need to copy/adapt/cleanup the compile_resources from the android_apk_or_module, and feed that new target to srcjar_deps of a  
java_library(_java_target_name) {
    supports_android = true
    srcjar_deps = _srcjar_deps
  }
then add _java_target_name to the dist_aar deps.

seams easy-peasy :-)
Reply all
Reply to author
Forward
0 new messages