找不到类从XXX XXX的方法引用< YYY>

编程入门 行业动态 更新时间:2024-10-26 06:35:21
本文介绍了找不到类从XXX XXX的方法引用< YYY>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我工作的一个libGDX项目,我有一类称为CheerVArachnids有这是一个事件监听其他内嵌类。当我在桌面上运行这个项目,它工作正常。但是当我运行我的Andr​​oid设备上,它无法找到内联类,我得到了以下错误:

I'm working on a libGDX project and I have a class called CheerVArachnids that has another inline class which is an event listener. When I run this project on the desktop it works fine. BUT when I run on my Android device, it can't find that inline class and I get the following error:

Could not find class 'com.bbj.cva.CheerVArachnids$PlaceUnitListener', referenced from method com.bbj.cva.CheerVArachnids.<init>

下面是我班上的重要组成部分:

Here are the important parts of my class:

package com.bbj.cva; public class CheerVArachnids implements ApplicationListener { class PlaceUnitListener implements EventSubscriber<PlaceUnitEvent> { @Override public void onEvent(PlaceUnitEvent event) { // } } public CheerVArachnids() { EventBus.subscribe(PlaceUnitEvent.class, new PlaceUnitListener()); EventBus.subscribe(RemoveScreenObjectEvent.class, new RemoveScreenObjectListener()); } }

任何想法,为什么在Android上,在运行时就找不到内嵌类?

Any ideas why on Android, at runtime it can't find that inline class?

推荐答案

由于某些ADT-版本,你必须设置哪些库/项目应该被导出。

Since some ADT-Version you have to set which libraries / projects should be exported too.

项目-Propiertes - > Java构建路径 - >订单和出口 - >检查你的源代码和其他图书馆使用的是

Project-Propiertes -> Java Build Path -> Order and Export -> Check your Sources and other Libraries you are using.

做这些以出口设置你的核心 - 和Android项目。

Do these Export-Settings for your Core- and Android-Project.

然后,它应该能正常运行在Android上。

Then it should work fine on Android.

更多推荐

找不到类从XXX XXX的方法引用&LT; YYY&GT;

本文发布于:2023-11-04 10:23:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1557669.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   方法   XXX   GT   LT

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!