在Eclipse的Andr​​oid应用程序问题应用程序、问题、Eclipse、Andr

2023-09-07 16:07:42 作者:旧时光的帅气少年

我是一个.NET开发者,但我喜欢JAVA所以我的空闲时间我玩的那个。我通常不使用Eclipse,但我安装了ADT Eclipse插件和Andriod的SDK,我开始学习,我做了一个TableLayout一个新的项目,它还挺看起来不错,并且它运行正常在模拟器上。

I'm a .NET developer but I like JAVA so in my free time I play around with that. I don't normally use Eclipse but I installed the ADT eclipse plugin and Andriod SDK and I started learning and I made a new project with a TableLayout and it kinda looks good, and it runs ok on the emulator.

不过......那里,推动我绝对紧张,也许我做错了一些事情,所以请帮助我。 首先,如果我改变的任何方式的main.xml中的文件,即使添加的是假想一个正确的参数,它将开始吓坏了,并会产生,只是说:错误,而不指定是一个错误,它就会产生一个main.out.xml再报告错误的main.out.xml是空的。它以后不会让我删除,并开始产生main.out.out.xml等等,即使是在我纠正导致错误的原始XML。

However... there a few things that drive me absolutely catatonic and perhaps I am doing something wrong so please help me out. Firstly, if I change the main.xml file in whatever way, even by adding what is supposedly a correct parameter, it will start freaking out and will generate an error that just says "error" without specifying what that is, it will then generate a main.out.xml and then report an error that the main.out.xml is empty. It later won't let me delete that and will start generating a main.out.out.xml and so forth, even after I correct that original xml that caused the error.

让事情继续下去的唯一方法是删除bin文件夹,重新启动Eclipse,删除所有从XML文件,然后有时它会运行应用程序或其他一些时候,它会再次开始产生那​​些'出'文件和循环下去。

The only way to get things going is to delete the bin folder, restart Eclipse, delete all the out xml files and then sometimes it will run the application or some other times it will start generating those 'out' files again and the loop goes on.

这需要时间来运行一个简单的应用程序,即使是没有了用于之前运行的错误的方式。 当然,这不是他们打算如何它的工作,是不是? 还..没有重建按钮,将刷新所有文件自动退出,抑或是隐藏在某处?我厌倦了手动删除这些自动生成的文件和构建文件夹和所有那些out.xml文件。

That way it takes hours to run a simple app even one without errors that used to run before. Surely that was NOT how they intended it to work, is it?? Also.. there is no "Rebuild" button that will flush all files out automatically, or is it hidden somewhere? I am tired of manually deleting those automatically generated files and the build folder and all those out.xml files.

此外,虽然我在这,我也想指出的是,设计师认为,有时消失,没有什么在地球上,将其带回,唯一的方法是创建一个新项目,并复制为主。 XML来,然后将其显示出来了。另一种错误?

Also, while I'm at it, I also want to point out that the designer view sometimes disappears and there is nothing on earth that will bring it back, the only way is to create a new project and copy the main.xml to it and then it shows up again. Another bug?

我有最新的Eclipse版本: 版本:靛蓝服务版本2 建立ID:20120216-1857

I have the latest eclipse version: Version: Indigo Service Release 2 Build id: 20120216-1857

如果您有任何线索,如何得到这个工作,我会AP preciate吧! 提前非常感谢

If you have any clues how to get this to work, I will appreciate it! Many thanks in advance

推荐答案

当你点击运行按钮,选择一个XML文件,Eclipse正在运行的XML XSL转换并产生了 .OUT。 XML 文件作为结果。这是在Eclipse Web工具功能,如果你安装了Eclipse,而您将有一个特点的Java EE开发包(它可能包括在其他包,太)。

When you click the Run button with an XML file selected, Eclipse is running an XSL Transformation on that XML and producing the .out.xml file as the result. This is a feature of the Eclipse Web Tools feature, which you'll have if you installed the Eclipse for Java EE Developers package (it may be included in other packages, too).

正如其他人所说的上述评论,来运行你的Andr​​oid应用程序,选择项目,单击鼠标右键,然后选择运行方式> Android应用程序。一旦你这样做一次,它会创建一个启动配置,你可以在运行或调试工具栏按钮(pressing小发射向下箭头上在运行或调试按钮,会弹出启动配置的列表,你可以从中选择,以及一个选项来管理它们)。

As others have said above in the comments, to run your Android app, select the Project, right-click, and choose Run As > Android App. Once you've done that once, it will create a Launch Configuration that you can launch from the Run or Debug toolbar buttons (pressing the small down-arrow on the Run or Debug buttons brings up a list of Launch Configurations that you can select from, as well as an option to manage them).

有一个preference,这将使总的Eclipse推出,而不是试图要聪明关于什么是当前选择您运行或调试的最后一件事。打开preferences并导航到运行/调试> 启动;在那里,你会发现下启动运行在窗口底部的选项。

There is a Preference that will make Eclipse always launch the last thing you ran or debugged, instead of trying to be smart about what is currently selected. Open the Preferences and navigate to Run/Debug > Launching; there you'll find the option under Launch Operation at the bottom of the window.