I have version 1.5.1 of Android studio. Apparently this never version doesn't have an asset folder for txt files. How are you suppose to includes these files into you project? And how to further use the within you application? Thanks for your advice
Select Project Details under the project's thumbnail. Select the More menu. Select Duplicate.
Select your project then go to Refactor -> Copy... . Android Studio will ask you the new name and where you want to copy the project. Provide the same. After the copying is done, open your new project in Android Studio.
Launch Android Studio, and click File > New > Import Project. Locate your project directory, click the build. gradle file you created above to select it, and then click OK to import your project.
An Android App Bundle is a file (with the . aab file extension) that you upload to Google Play.
You can go to New->add folder -> assets folder and the folder will automatically be put in the right place.
Please reference the following where I got this answer -- it also includes a screenshot:
Adding an assets folder in Android Studio
To access something from the assets folder in your application you need to use the AssetManager:
Please refer to the following for a full example:
How to access file under assets folder?
Project window
, press Alt-Insert
, and select Folder->Assets folder
. Android Studio will add it automatically to the correct location.
And then you can add your assets or/txt files(whatever you want) on it.
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