I"m trying to Create a sample data directory, using Android Studio, by clicking on app in the project view and then right mouse click to find the menu item New > Sample Data Directory.
It is not working.
The sample data collection file is a regular JSON file. This file is placed in sampledata folder in the root of your application module. It is also possible to create this using android studio by right clicking on the module and navigating to New > Sample Data Directory as shown in the screenshot below.
Accessing all of the files on your Android device is really simple: Open your devices' App drawer – Depending on the version of Android software you're running you can click on the home screen icon that has several dots or you can swipe up on the screen. Use the search bar to quickly locate the 'File Manager' app.
Creating the directory via android studio doesn't always work. You may need to create the directory manually in your directory structure (at /app/sampledata/) without using Android Studio. Once you create it (e.g., via Windows Explorer) it should show up in Android Studio. See the the following answer for more information about sample data in general: How to put new placeholder resources into Android Studio project ("tools:sample" resources)?
"Unlike resources like images, fonts, etc. The sample data does not go in /res/ (they are not compiled with the app, hence. It is probably easier to filter them out by putting them in a totally separate directory). They go in /app/sampledata/, for example: /app/sampledata/image.png."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With