New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 722302 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
OOO until Feb 4th
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 620034



Sign in to add a comment

Resources gone from Android Studio

Project Member Reported by dgn@chromium.org, May 15 2017

Issue description

I synced on master and regenerated the gradle setup, all the resources are gone from the project. They don't show up in find files and they are also not visible in the Project view.
 
Cc: bsazonov@chromium.org
Same here. I use Android Studio to edit xml layouts, so this is unfortunate.
It seems that adding "--use-gradle-process-resources --split-projects" to generate_clank_gradle.sh command fixes this. Are there any pitfalls in adding these options? Right now I generate project with the following command:

clank/bin/generate_clank_gradle.sh --output-directory out/AndroidDebug --use-gradle-process-resources --split-projects

Comment 2 by wnwen@chromium.org, May 17 2017

Status: Started (was: Assigned)
Looking into this. You shouldn't have to add those flags to just edit xml layouts.

Those flags cause a module to be generated for each gn target, which means imports/refactoring will not work cross-module, and Android Studio may give you lots of redlines editing java.
Project Member

Comment 3 by bugdroid1@chromium.org, May 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dc177240b50784d9fe81d654e129275028e6d97f

commit dc177240b50784d9fe81d654e129275028e6d97f
Author: wnwen <wnwen@chromium.org>
Date: Wed May 17 17:18:54 2017

Android: Add resources back to Android Studio

Resources were not collected for the pseudo all module before. Adding it
back, but skipping the generated resources folders.

BUG= 722302 

Review-Url: https://codereview.chromium.org/2888923002
Cr-Commit-Position: refs/heads/master@{#472485}

[modify] https://crrev.com/dc177240b50784d9fe81d654e129275028e6d97f/build/android/gradle/generate_gradle.py

Comment 4 by wnwen@chromium.org, May 17 2017

Status: Fixed (was: Started)
Let me know if this works for you. Excluded generated resources for now since this is just to enable editing.

If you want all the resources for a specific apk, just generate for that apk, and you should get back everything (use --target).
Works for me, thanks!

Comment 6 by wnwen@chromium.org, May 24 2017

Status: Verified (was: Fixed)

Sign in to add a comment