[英]ClassNotFoundException android after copy a class from one app to another one
I am programming two applications; 我正在编写两个应用程序; I have used some Classes from one of these applications into the other one.
我已经从这些应用程序中的一个到另一个应用程序中使用了一些类。 When I tried to instance the class it shows ClassNotFoundException.
当我尝试实例化该类时,它显示ClassNotFoundException。 (It's not an Activity Class) when it show me the error I notice that the path to the class it has used is from the first app.
(这不是活动类),当它显示错误时,我注意到它使用的类的路径来自第一个应用程序。 The Class is inside my new app package.
该类位于我的新应用程序包中。 What can i do?
我能做什么? Help me please
请帮帮我
This may be obvius but, if you copied the files directly in the filesyste (outside eclipse) you have to do a File Refresh and then a Project clean inside eclipse for it to take the changes. 这可能很麻烦,但是,如果直接将文件复制到filesyste(Eclipse外)中,则必须先执行File Refresh(文件刷新),然后在Eclipse内部进行Project清洁,以使更改生效。
If you copied the classes inside eclipse, check that the import statements where you are using the classes are ok (referencing the correct project). 如果您在eclipse中复制了类,请检查使用这些类的import语句是否正确(引用正确的项目)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.