-3

I am creating an android app using Android Studio. In the project view, apart from the main folder where all my classes are stored I also have "androidTest" and "test" folders (marked with red in the image). I did not created these folders and I believe Android Studio generated these folders. What are these folders for? Is it safe to delete them?

enter image description here

4

2 Answers 2

0

Yes, you can delete them (and you can delete their references from the gradle file), but why even bother? These files are just there to nudge you do the right thing.

They're like the broccoli that your mother might put on your plate even though she probably already knows that you're not going to eat them. You could refuse them and even delete them, but there is really little to no point in doing that.

If you want less visual clutter, just use the "Android View" instead of the "Project View" and don't expand those particular test folders.

0

These folders are created by default for testing your code

  • src/test - Unit Tests
  • src/androidtest - Android Instrumentation tests

[Read more]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.