1. Download our Official Android App: Forums for Android!

Apps Conversion to Dalvik format failed with error 1

Discussion in 'Android Development' started by krishna.c, Apr 21, 2011.

  1. krishna.c

    krishna.c Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    15
    Joined:
    Apr 13, 2011

    Apr 13, 2011
    15
    0
    15
    Hello,

    I opened an Android project to create a web service as below:

    _________________________________________________________

    package com.hascode.tutorial.soap;

    import android.app.Activity;
    import android.os.Bundle;
    import javax.jws.WebMethod;
    import javax.jws.WebService;


    public class SampleServiceActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    }

    @WebService
    public class SampleService extends SampleServiceActivity{
    @WebMethod(operationName = "getInfo")
    public String getInformation() {
    return "hasCode.com";
    }

    public String doubleString(String inString) {
    return inString + inString;
    }
    }

    }

    ___________________________________________________________



    ___________________________________________________________

    package com.hascode.tutorial.soap;

    import javax.xml.ws.Endpoint;

    import com.hascode.tutorial.soap.SampleServiceActivity.SampleService;

    public class Main {
    public static void main(String[] args) {
    SampleService sampleService = null;
    Endpoint.publish("http://localhost:8090/soap/sample", sampleService);

    }

    }
    _______________________________________________________________


    I tried to clean the project, yet I receive the following error:

    trouble processing "javax/xml/ws/Action.class":

    Ill-advised or mistaken usage of a core class (java.* or javax.*)
    when not building a core library.

    ...
    ...
    ...

    Conversion to Dalvik format failed with error 1


    Regards,
    Krishna.
     

    Advertisement

  2. krishna.c

    krishna.c Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    15
    Joined:
    Apr 13, 2011

    Apr 13, 2011
    15
    0
    15
    Well...'theconversion to Dalvik format failed with error 1' cleared. What I did was: "I removed all jar files except the android.jar(present by default). Then, I added JAX-WS Libraries."


    The new problem I've -- is as follows:

    I'm trying to debug the program as an android application, but all I get to see is "Source not found" followed by the button 'Edit Source Lookup Path'. The debug session doesn't enter the code with the usual highlighter.

    Please help me identify the problem.

    Regards,
    Krishna.
     
  3. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,972
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,972
    3,603
    513
    Android App Developer
    NY
    Do you use Ant to build?

    Delete the bin directory and gen directory, or do the command

    >ant clean

    Then do:

    Project > Clean

    from Eclipse (may need to do do this more than once but wait a min or two for the project to build again).


    When all else fails close Eclipse and delete your .android directory in your user folder. It will be recreated when you open Eclipse again.

    on Windows 7 it is in C:\Users\(your user name)\.android
     
  4. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,972
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,972
    3,603
    513
    Android App Developer
    NY
  5. krishna.c

    krishna.c Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    15
    Joined:
    Apr 13, 2011

    Apr 13, 2011
    15
    0
    15
    alostpacket,

    I deleted the bin and gen directories, followed by Project > clean. Still, I get the same error on trying to debug: "Source not found"
    ('Edit source look up path' button below).

    Krishna.
     
  6. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,972
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,972
    3,603
    513
    Android App Developer
    NY
    You can't use JAX-WS libraries according to that post, not sure what else to tell you though, sorry.
     

Share This Page

Loading...