Projucer does not copy Extra Android Xml/Drawable/Raw resources

android
#1

Hi everybody,

I am working on Android projects and I have some issues with the following fields in the Projucer:

  • Extra Android XML Value Resources
  • Extra Android Drawable Resources
  • Extra Android Raw Resources

Whatever I put in this field (relative path, absolute path), nothing is copied in the Android project.
I think that there is a bug in

AndroidProjectExporter::copyExtraResourceFiles

I have created an issue and suggested a fix through a Pull Request, but it seems that the forum is the most appropriate place to report such issues.

Regards,

#2

The change that you’ve suggested would break existing projects that use these fields as relative paths would be relative to the project folder instead of the .jucer file as it is currently.

What isn’t working for you? I’ve just tried this with a relative and absolute file path and they are copied into the project correctly and show up in Android Studio.

#3

After reading your reply, I realized that I should add …/ before each path to make it work.
I was expecting to use a path related to the .jucer folder and not from the .jucer itself (like for field ‘Java source code folders’)

For example, I have the following directory tree

  • project.jucer
  • Android
    • Java
      • Src
        • Activity.java
      • res
        • drawable
          • launch_screen.xml
        • values
          • myvalues.xml

In ‘Java Source code folders’, I put Android/Java/Src
but in ‘Extra Android XML Value Resources’, I put ../Android/res/values/myvalues.xml

This is a bit weird for me.

BTW, I was also expecting ‘Extra Android Raw Resources’ to copy the content of ‘drawable folders’ (that’s what I understood from the tooltip), but actually, I have to enter each file one by one.
With the source tree above, I wanted to put ../Android/drawable and I was expecting the whole folder to be copied under res/drawable
but this does not copy anything, the only thing that I managed to copy are individual files
e.g. ../Android/drawable/launch_screen.xml is copied under res

Regards,