Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generated source files should not be edited?

When I create this new class Quake and try to write some code in it ,it displays the following message, enter image description here

and when I try to run it Android Studio automatically delete the class Quake.

enter image description here

Can someone explain me why is this happening and how to resolve it ?

like image 945
Prateek Joshi Avatar asked Jun 17 '15 08:06

Prateek Joshi


1 Answers

You're in Packages view and putting all your files in the wrong folder. Switch to Project view (left hand, top side toggle). Under app, you should see a folder called src -> main -> java -> com.example.prateek. That's where all your class files should properly be to avoid autodeletion.

like image 97
Matter Cat Avatar answered Oct 23 '22 07:10

Matter Cat