Where do I place the 'assets' folder in Android Studio? -


i confused assets folder. doesn't come auto-created in android studio, , forums in discussed talk eclipse.

how can assets directory configured in android studio?

since android studio uses the new gradle-based build system, should putting assets/ inside of source sets (e.g., src/main/assets/).

in typical android studio project, have app/ module, main/ sourceset (app/src/main/ off of project root), , primary assets go in app/src/main/assets/. however:

  • if need assets specific build, such debug versus release, can create sourcesets roles (e.g,. app/src/release/assets/)

  • your product flavors can have sourcesets assets (e.g., app/src/googleplay/assets/)

  • your instrumentation tests can have androidtest sourceset custom assets (e.g., app/src/androidtest/assets/), though sure ask instrumentationregistry getcontext(), not gettargetcontext(), access assets

also, quick reminder: assets read-only @ runtime. use internal storage, external storage, or the storage access framework read/write content.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo