生成的源文件不应该被编辑? [英] Generated source files should not be edited?
问题描述
当我创建此new class
Quake 并尝试在其中编写一些代码时,它会显示以下消息,
When I create this new class
Quake and try to write some code in it ,it displays the following message,
,当我尝试使用run it
Android Studio automatically delete
类Quake
时.
and when I try to run it
Android Studio automatically delete
the class Quake
.
有人可以解释一下为什么会发生这种情况以及如何解决吗?
Can someone explain me why is this happening and how to resolve it ?
推荐答案
您处于Packages
视图中,并将所有文件放在错误的文件夹中.切换到Project
视图(左手,顶部切换).在app
下,您应该看到一个名为src
-> main
-> java
-> com.example.prateek
的文件夹.那就是所有类文件应该正确放置以避免自动删除的地方.
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.
这篇关于生成的源文件不应该被编辑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!