Generated source files should not be edited?… here is a solution to the problem.
Generated source files should not be edited?
When I create this new class
Quake and try to write some code in it, it shows the following message,
When I tried to run it
, Android Studio automatically removed
the class Quake
.
Can someone explain to me why this is happening and how to fix it?
Solution
You are in the Packages
View and put all the files in the wrong folder. Switch to Project
View (left, top switch). Under apps
, you should see a folder named src
-> main
-> java
-> com .example.prateek.
This is where all your class files should be placed correctly to avoid automatic deletion.