Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since Android Studio uses <a href="http://tools.android.com/tech-docs/new-build-system/user-guide">the new Gradle-based build system</a>, you should be <a href="http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Project-Structure">putting <code>assets/</code> inside of the source sets</a> (e.g., <code>src/main/assets/</code>).</p> <p>In a typical Android Studio project, you will have an <code>app/</code> module, with a <code>main/</code> sourceset (<code>app/src/main/</code> off of the project root), and so your primary assets would go in <code>app/src/main/assets/</code>. However:</p> <ul> <li><p>If you need assets specific to a build, such as <code>debug</code> versus <code>release</code>, you can create sourcesets for those roles (e.g,. <code>app/src/release/assets/</code>)</p></li> <li><p>Your product flavors can also have sourcesets with assets (e.g., <code>app/src/googleplay/assets/</code>)</p></li> <li><p>Your instrumentation tests can have an <code>androidTest</code> sourceset with custom assets (e.g., <code>app/src/androidTest/assets/</code>), though be sure to ask the <code>InstrumentationRegistry</code> for <code>getContext()</code>, not <code>getTargetContext()</code>, to access those assets</p></li> </ul> <p>Also, a quick reminder: assets are read-only at runtime. Use <a href="https://commonsware.com/blog/2014/04/07/storage-situation-internal-storage.html">internal storage</a>, <a href="https://commonsware.com/blog/2014/04/08/storage-situation-external-storage.html">external storage</a>, or <a href="http://developer.android.com/guide/topics/providers/document-provider.html">the Storage Access Framework</a> for read/write content.</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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