1

Every time I start a project in Android, I have to go and grab the different libraries/dependencies that I usually use.

Is there a way to have these dependencies in a file/or build file that I can always import/include when I start a new project? I find it better than copy-paste every time Thanks

Tanveer Munir
  • 1,956
  • 1
  • 12
  • 27
Snake
  • 14,228
  • 27
  • 117
  • 250
  • 1
    You can create your own project template in AS: This one would appear in the New -> Project dialog Or you create a file template by your own. https://stackoverflow.com/questions/35199899/android-studio-create-project-template-for-new-projects https://medium.com/@factoryhr/how-to-make-templates-in-android-studio-d83326a06463 – Christopher Apr 18 '19 at 12:06

2 Answers2

0

your dependencies are listed in build.gradle(project root and app directory). Copy/move these existing build.gradles in your new project.

Ranjan Kumar
  • 1,164
  • 7
  • 12
0

One can apply dependencies blocks like this:

apply from: "dependencies.gradle"
Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • Thank you. Interesting one. What would dependencies.gradle look like? Complete gradle file? – Snake Apr 18 '19 at 13:25