New issue
Advanced search Search tips

Issue 804889 link

Starred by 0 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Adding an XML layout requires gn clean to compile

Project Member Reported by vabr@chromium.org, Jan 23 2018

Issue description

Repro steps:

(1) Compile chrome_public_apk_incremental on tip of the tree:
nice ninja -C out/gn-dbg/ -j2500 -l20 chrome_public_apk_incremental

(2) Add a new layout in chrome/android/java/res/layout/new_layout.xml

(3) Try to use it in a .java file:
...
import android.view.LayoutInflater;
...
view = inflater.inflate(R.layout.new_layout, container, false);
...

(4) Compile again as in step (1)



Expected: All works.

Actual: The compiler claims that R.layout has no member called new_layout. Somehow, the android_resources rule does not seem to reflect on the changed content of chrome/android/java/res/layout.

Workaround: Delete out/gn-dbg/toolchain.ninja and recompile.


Note: I have non tried the non-incremental build.

Note: My gn configuration:
is_debug = true
use_goma = true
enable_nacl = false
is_component_build = true
disable_incremental_isolated_processes = true
target_os = "android"

Note: I was compiling this on a Linux machine.
 

Comment 1 by vabr@chromium.org, Jan 23 2018

Status: WontFix (was: Unconfirmed)
agrieve@ tells me that this is a known issue, which is hard to get rid of unless we give up the convenience of not having to list every XML file separately.

And actually a better workaround is just to run:
gn gen out/gn-dbg

Sign in to add a comment