android force close: ClassNotFoundException for Activity class

前端 未结 11 1358
情歌与酒
情歌与酒 2020-12-29 08:04

When I start my (soon-to-be) android game (from eclipse) it opens, but immediately force-closes.

Logcat says:

07-09 17:12:35.709: ERROR/AndroidRuntim         


        
11条回答
  •  不知归路
    2020-12-29 08:11

    I had this problem once when my working application suddenly started throwing ClassNotFoundException. The problem was that the classes were not being compiled and translated to the "dex" file, this is obvious to find because the APK just shrinks.

    So, in eclipse, in order to fix it just add the javabuilder to your .project file.

    
      org.eclipse.jdt.core.javabuilder
      
      
    
    

    Hope it helps.

提交回复
热议问题