NoClassDefFoundError - Eclipse and Android

后端 未结 27 999
夕颜
夕颜 2020-11-22 08:02

I\'m having a problem trying to run an Android app which, up until adding a second external library to its build path, was working fine. Since having added the scoreninja ja

相关标签:
27条回答
  • 2020-11-22 08:33

    Sometimes it will happen due to not including jar, which you have dependency, with "uses-libary" tag in your AndroidManifest.xml.

    Also, make sure it should be inside "application" tag.

    Regards,

    Ravi

    0 讨论(0)
  • 2020-11-22 08:34

    I'm not sure if this is related, or if you're even still looking for an answer, but I came across this thread while trying to research the same error (but possibly for different reasons).

    I couldn't find any solutions online, but an answer on a similar thread got me thinking and realized I probably just needed to rebuild (or clean) the project.

    In Eclipse, go to Project => Clean. Select your project and Eclipse seemed to fix it itself. For me this solved the problem.

    Hope this helps.

    0 讨论(0)
  • 2020-11-22 08:34

    If you change your order and export in your project build path, this error will not occur. The other way of achieving it is through .classpath in your project folder.

    0 讨论(0)
  • 2020-11-22 08:35

    Acutally you have reached the infamous 64k limit issue, you need to enable multidex.

    This is how you do it. https://developer.android.com/tools/building/multidex.html

    0 讨论(0)
  • 2020-11-22 08:36

    I had this for MapActivity. Builds in Eclipse gets NoClassDefFound in debugger.

    Forgot to add library to manifest, inside <Application>...</Application> element

    <uses-library android:name="com.google.android.maps" />
    
    0 讨论(0)
  • 2020-11-22 08:37

    Same thing worked for me: Properties -> Java Build Path -> "Order and Export" Interestingly - why this is not done automatically? I guess some setting is missing. Also this happened for me after SDK upgrade.

    0 讨论(0)
提交回复
热议问题