Java.lang.NoClassDefFoundError: Known ADT issue 17

I am using wsimport.exe from android sdk file and manually import (drag and drop in output classes) into my project (no external jars - imported files are part of src folder).

It works fine in a java test project, but when I try to implement it in an android project, I ran into this strange issue. I've already read some information about a known issue with ADT 17 changes, but it all has to do with reordering external jars. I don't import any jar so that it doesn't touch me.

Does anyone know if this is part of the ADT 17 issue?

Here is my logcat:

04-06 02:07:09.340: E/AndroidRuntime(13308): java.lang.NoClassDefFoundError: org.tempuri.Service1
04-06 02:07:09.340: E/AndroidRuntime(13308):    at hhs.pack.ListViewActivity.getListFromDB(ListViewActivity.java:72)
04-06 02:07:09.340: E/AndroidRuntime(13308):    at hhs.pack.ListViewActivity.onCreate(ListViewActivity.java:40)

      

0


source to share


2 answers


The problem might be that the apk tool is ignoring classes, or that Eclipse doesn't know what to do with the files class

(I'll explain this a bit). Why don't you just create a jar with your classes? In eclipse you can simply right-click on the project, which has classes and tell Export

> Java

> Jar

.

If this is out of the question, try moving the classes you create to folder bin

> classes

instead of saving to your source (unless you have an eclipse setting to save classes in the same folders as the original which is not the default option. this option might fix your problem).

You can try to enable the option Allow output folders for source folders to the eclipse in Project

> Properties

> Java Build Path

> Source

.



If you start generating an Jar

otpion then the Jar

one you are using in your source must be in a folder libs

in your Android project, otherwise it will not be packaged with your application. I noticed that in some of the older versions of ADT you have to add the jar to your project libraries as well.

That's all I have to offer, I always create my own jar in situations like yours.

0


source


Have you reviewed the information on this link? http://tools.android.com/recent/dealingwithdependenciesinandroidprojects



0


source







All Articles