简体   繁体   English

在Eclipse Android项目中加载java.awt.font时出错?

[英]Error loading java.awt.font in Eclipse Android project?

I've seen a few places where this was asked but I haven't seen where it's been resolved. 我已经看过一些询问此问题的地方,但还没有看到解决它的地方。

I've just installed the tools needed to develop Android applications. 我刚刚安装了开发Android应用程序所需的工具。 This includes, of course, Eclipse. 当然,这包括Eclipse。 When I try to open the res/main.xml file, I get the error 'could not initialize class java.awt.font'. 当我尝试打开res / main.xml文件时,出现错误“无法初始化类java.awt.font”。

I'm running the newest version of Eclipse and all the software required for Android development. 我正在运行Eclipse的最新版本以及Android开发所需的所有软件。 I'm running on Ubuntu 10.04 32bit. 我在32位Ubuntu 10.04上运行。

Sun JDK and JRE are installed. 已安装Sun JDK和JRE。

Any ideas? 有任何想法吗?

Just right click on the XML file in the package explorer (your navigation pane) and go to "Open With" and then "XML Editor". 只需右键单击包浏览器中的XML文件(您的导航窗格),然后转到“打开方式”,然后转到“ XML编辑器”。

From that point, if you just want to look at the code, just above where eclipse puts the "Console" tab (nearer to the bottom of the eclipse window), you should see a small tab, which says "Source". 从这一点出发,如果您只想看代码,在eclipse放置“ Console”选项卡的位置上方(靠近eclipse窗口的底部),您应该看到一个小选项卡,上面写着“ Source”。 Clicking on that will get you the pure code in the XML file. 单击该按钮将获得XML文件中的纯代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM