androidexchange-serverindependentsoft

JWebServices with Android doesn't work


Code:

import com.independentsoft.exchange.Service;

import android.app.Activity;
import android.os.Bundle;

public class ContactsToExchangeActivity extends Activity {
        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);

                Service service = new Service();
        }
}

Log:

 03-25 16:57:49.901: E/AndroidRuntime(717): FATAL EXCEPTION: main
 03-25 16:57:49.901: E/AndroidRuntime(717): java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLSocketFactory.<init>
 03-25 16:57:49.901: E/AndroidRuntime(717): at com.independentsoft.exchange.Service.a(SourceFile:182)
 03-25 16:57:49.901: E/AndroidRuntime(717): at com.independentsoft.exchange.Service.<init>(SourceFile:90)
 03-25 16:57:49.901: E/AndroidRuntime(717): at ua.kh.softcompany.ContactsToExchangeActivity.onCreate(ContactsToExchangeActivity .java:22)
 03-25 16:57:49.901: E/AndroidRuntime(717): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
 03-25 16:57:49.901: E/AndroidRuntime(717): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
 03-25 16:57:49.901: E/AndroidRuntime(717): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
 03-25 16:57:49.901: E/AndroidRuntime(717): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
 03-25 16:57:49.901: E/AndroidRuntime(717): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
 03-25 16:57:49.901: E/AndroidRuntime(717): at android.os.Handler.dispatchMessage(Handler.java:99)
 03-25 16:57:49.901: E/AndroidRuntime(717): at android.os.Looper.loop(Looper.java:130)
 03-25 16:57:49.901: E/AndroidRuntime(717): at android.app.ActivityThread.main(ActivityThread.java:3683)
 03-25 16:57:49.901: E/AndroidRuntime(717): at java.lang.reflect.Method.invokeNative(Native Method)
 03-25 16:57:49.901: E/AndroidRuntime(717): at java.lang.reflect.Method.invoke(Method.java:507)
 03-25 16:57:49.901: E/AndroidRuntime(717): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
 03-25 16:57:49.901: E/AndroidRuntime(717): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
 03-25 16:57:49.901: E/AndroidRuntime(717): at dalvik.system.NativeStart.main(Native Method)

Can you please tell what the problem is and how to fix it?


Solution

  • Had similar problem and asked Independentsoft to send me Android specific jar file. They have separate build for Andorid.