源附件不包含文件 PApplet.class 的源
我正在使用 Android 处理为 Android 制作一个声音玩具。我首先在处理编辑器中编写代码,但现在将其引入 Eclipse 以利用名为 libpd 的声音库。我尝试在手机上运行该应用程序,但从调试窗口中收到以下错误:
Main(PApplet).die(String) line: 2451
Main(PApplet).die(String, Exception) line: 2460
Main(PApplet).loadFont(String) line: 3625
Main.setup() line: 62
Main(PApplet).handleDraw() line: 1779
PGraphicsAndroid2D.requestDraw() line: 161
Main(PApplet).run() line: 1670
Thread.run() line: 1019
令我困惑的是,其中一个错误是无法找到字体文件。我将所有必要的矢量图像文件,特别是字体文件放在项目的资产文件夹中,所以我不确定那里发生了什么。
主要的错误似乎与“源附件不包含文件 PApplet.class 的源”有关。我已将processing.core.* 导入到我的所有类中,并且主类扩展了PApplet。在类似的项目中我没有收到此错误。
这里是我的主类的代码,如果您需要我澄清任何内容,请随时询问。抱歉,代码非常丑陋......
编辑:这里是Android的链接处理页面。
I'm making a sound toy for Android using Android Processing. I first wrote the code in the Processing editor, but am now bringing it in to Eclipse to take advantage of a sound library called libpd. I tried to run the app on my phone, but got the following errors from the debug window:
Main(PApplet).die(String) line: 2451
Main(PApplet).die(String, Exception) line: 2460
Main(PApplet).loadFont(String) line: 3625
Main.setup() line: 62
Main(PApplet).handleDraw() line: 1779
PGraphicsAndroid2D.requestDraw() line: 161
Main(PApplet).run() line: 1670
Thread.run() line: 1019
What confuses me is that one of the errors is about being unable to find a font file. I put all the necessary vector image files, and the font file in particular in the project's assets folder, so I'm not sure what is a happening there.
Mainly, the errors seem to be concerned that "the source attachment does not contain the source for the file PApplet.class". I have imported the processing.core.* to all of my classes, and the main class extends PApplet. In a similar project I do not get this error.
Here is the code of my main class, if you need me to clarify anything don't hesitate to ask. Sorry, the code is pretty ugly...
EDIT: Here is the link to the Android processing page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
原来我无意中在字体文件的名称中添加了一个空格字符。它被命名为“HelveticaNeue-48.vlw”,当我在没有空格的情况下引用它时,这导致了一系列错误。
So it turns out I inadvertently added a space character in the name of the font file. It was named "HelveticaNeue-48.vlw ", which caused the slew of errors when I referred to it without the space.