Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to tell Application's AndroidManifest.xml take @string from a specific package
    primarykey
    data
    text
    <p>In my application's <code>AndroidManifest.xml</code> I am trying to tell it to use a string from a <code>/res/values</code> in a particular package instead of the first one one found in one of the libraries (the string <code>my_label</code> could be defined in more than one libraries) :</p> <pre><code> &lt;application android:icon="@drawable/icon" android:label="com.example.projname.appmodule:@string/my_label"&gt; </code></pre> <p>The above notation/syntax doesn't work, however. It only accepts the following form which doesn't allow pin-pointing a specific resource file:</p> <pre><code> &lt;application android:icon="@drawable/icon" android:label="@string/my_label"&gt; </code></pre> <p>Is it possible at all to tell Application's AndroidManifest.xml take a @string value from a specific <code>/res/values</code>?</p> <p><strong>EDIT:</strong> The interesting thing is, the build environment doesn't complain at all about the <code>"com.example.projname.appmodule:@string/my_label"</code> syntax. But when the application runs, it displays <code>com.example.projname.appmodule:@string/my_label</code> instead of the string value.</p> <p>As @Nikola Despotoski suggested below, a workaround could be setting this programmatically in the application, but since the build environment doesn't complain about this syntax, I am still wondering whether this a bug in the build env or something that I have been missing.</p> <p>My workaround, for now, is to make sure that <code>my_label</code> is unique, e.g. my_3F2504E0-4F89-11D3-9A0C-0305E82C3301_label so it can't appear in any other package.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload