生成的源文件不应该被编辑? [英] Generated source files should not be edited?

查看:284
本文介绍了生成的源文件不应该被编辑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建此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 deleteQuake时.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆