Привет, ребята, здесь на stackoverflow.com Я студент и занимаюсь разработкой небольшого todo-приложения для себя с производственной интеграцией. Теперь я нашел библиотеку под названием Producteev4j, которую можно найти по адресу: http://code.google.com/p/producteev4j/
Я скачал и добавил банку в свой проект.
но из-за запасного документа я не могу понять, как это реализовать. Я сделал кнопку со следующей выдержкой из кода:
ProducteevTransport transport = new com.producteev4j.transport.SimpleTransportImpl();
((SimpleTransportImpl) transport).setApiKey("myapi");
((SimpleTransportImpl) transport).setApiSecret("mysecret");
if(service==null){
service = ProducteevServiceFactory.getService("com.producteev4j.services.version0.ProducteevServiceV0",transport);
}
try {
userLogin = service.userLogin(EMAIL, PASSWORD);
} catch (ProducteevSignatureException e) {
e.printStackTrace();
} catch (ProducteevServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ProducteevException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
userToken = userLogin.getToken();
и эти переменные:
private ProducteevService service=null;
private UserLogin userLogin;
Но это не сработает, я всегда нажимаю кнопку, на которой происходит сбой приложения, со следующим (это полный файл журнала за один запуск)
01-03 12:33:37.585: D/dalvikvm(244): GC freed 832 objects / 62864 bytes in 82ms
01-03 12:33:37.895: D/dalvikvm(244): GC freed 51 objects / 1936 bytes in 53ms
01-03 12:33:38.195: D/dalvikvm(244): GC freed 132 objects / 6240 bytes in 55ms
01-03 12:33:38.475: D/dalvikvm(244): GC freed 58 objects / 2312 bytes in 54ms
01-03 12:33:38.765: D/dalvikvm(244): GC freed 62 objects / 6112 bytes in 54ms
01-03 12:33:39.175: D/ViewFlipper(244): updateRunning() mVisible=true, mStarted=false, mUserPresent=true, mRunning=false
01-03 12:33:47.925: E/dalvikvm(244): Could not find class 'org.codehaus.jackson.map.ObjectMapper', referenced from method com.producteev4j.marshall.JacksonMappingUtil.<clinit>
01-03 12:33:47.925: W/dalvikvm(244): VFY: unable to resolve new-instance 146 (Lorg/codehaus/jackson/map/ObjectMapper;) in Lcom/producteev4j/marshall/JacksonMappingUtil;
01-03 12:33:47.925: D/dalvikvm(244): VFY: replacing opcode 0x22 at 0x0000
01-03 12:33:47.925: D/dalvikvm(244): Making a copy of Lcom/producteev4j/marshall/JacksonMappingUtil;.<clinit> code (32 bytes)
01-03 12:33:47.935: W/dalvikvm(244): VFY: unable to find class referenced in signature (Lorg/codehaus/jackson/type/JavaType;)
01-03 12:33:47.935: I/dalvikvm(244): Could not find method org.codehaus.jackson.map.ObjectMapper.canDeserialize, referenced from method com.producteev4j.marshall.JacksonMappingUtil.canRead
01-03 12:33:47.935: W/dalvikvm(244): VFY: unable to resolve virtual method 786: Lorg/codehaus/jackson/map/ObjectMapper;.canDeserialize (Lorg/codehaus/jackson/type/JavaType;)Z
01-03 12:33:47.935: D/dalvikvm(244): VFY: replacing opcode 0x6e at 0x0006
01-03 12:33:47.935: D/dalvikvm(244): Making a copy of Lcom/producteev4j/marshall/JacksonMappingUtil;.canRead code (40 bytes)
01-03 12:33:47.935: I/dalvikvm(244): Could not find method org.codehaus.jackson.map.type.TypeFactory.type, referenced from method com.producteev4j.marshall.JacksonMappingUtil.getJavaType
01-03 12:33:47.935: W/dalvikvm(244): VFY: unable to resolve static method 788: Lorg/codehaus/jackson/map/type/TypeFactory;.type (Ljava/lang/reflect/Type;)Lorg/codehaus/jackson/type/JavaType;
01-03 12:33:47.935: D/dalvikvm(244): VFY: replacing opcode 0x71 at 0x0000
01-03 12:33:47.935: D/dalvikvm(244): Making a copy of Lcom/producteev4j/marshall/JacksonMappingUtil;.getJavaType code (28 bytes)
01-03 12:33:47.945: W/dalvikvm(244): VFY: unable to find class referenced in signature (Lorg/codehaus/jackson/type/JavaType;)
01-03 12:33:47.945: I/dalvikvm(244): Could not find method org.codehaus.jackson.map.ObjectMapper.readValue, referenced from method com.producteev4j.marshall.JacksonMappingUtil.read
01-03 12:33:47.945: W/dalvikvm(244): VFY: unable to resolve virtual method 787: Lorg/codehaus/jackson/map/ObjectMapper;.readValue (Ljava/io/InputStream;Lorg/codehaus/jackson/type/JavaType;)Ljava/lang/Object;
01-03 12:33:47.945: D/dalvikvm(244): VFY: replacing opcode 0x6e at 0x000c
01-03 12:33:47.945: D/dalvikvm(244): Making a copy of Lcom/producteev4j/marshall/JacksonMappingUtil;.read code (282 bytes)
01-03 12:33:47.945: W/dalvikvm(244): VFY: unable to resolve exception class 140 (Lorg/codehaus/jackson/JsonParseException;)
01-03 12:33:47.945: W/dalvikvm(244): VFY: unable to find exception handler at addr 0x2e
01-03 12:33:47.955: W/dalvikvm(244): VFY: rejected Lcom/producteev4j/marshall/JacksonMappingUtil;.read (Ljava/io/InputStream;Ljava/lang/Class;)Ljava/lang/Object;
01-03 12:33:47.955: W/dalvikvm(244): VFY: rejecting opcode 0x0d at 0x002e
01-03 12:33:47.955: W/dalvikvm(244): VFY: rejected Lcom/producteev4j/marshall/JacksonMappingUtil;.read (Ljava/io/InputStream;Ljava/lang/Class;)Ljava/lang/Object;
01-03 12:33:47.955: W/dalvikvm(244): Verifier rejected class Lcom/producteev4j/marshall/JacksonMappingUtil;
01-03 12:33:47.955: D/AndroidRuntime(244): Shutting down VM
01-03 12:33:47.955: W/dalvikvm(244): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
01-03 12:33:47.955: E/AndroidRuntime(244): Uncaught handler: thread main exiting due to uncaught exception
01-03 12:33:47.975: E/AndroidRuntime(244): java.lang.VerifyError: com.producteev4j.marshall.JacksonMappingUtil
01-03 12:33:47.975: E/AndroidRuntime(244): at com.producteev4j.transport.SimpleTransportImpl._doGet(SimpleTransportImpl.java:29)
01-03 12:33:47.975: E/AndroidRuntime(244): at com.producteev4j.transport.AbstractTransport.process(AbstractTransport.java:69)
01-03 12:33:47.975: E/AndroidRuntime(244): at com.producteev4j.transport.AbstractTransport.process(AbstractTransport.java:52)
01-03 12:33:47.975: E/AndroidRuntime(244): at com.producteev4j.services.version0.ProducteevUserServiceV0Impl.userLogin(ProducteevUserServiceV0Impl.java:123)
01-03 12:33:47.975: E/AndroidRuntime(244): at com.producteev4j.services.version0.ProducteevServiceV0.userLogin(ProducteevServiceV0.java:85)
01-03 12:33:47.975: E/AndroidRuntime(244): at producteev.push.Producteev_pushActivity$2.onClick(Producteev_pushActivity.java:87)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.View.performClick(View.java:2364)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.View.onTouchEvent(View.java:4179)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.widget.TextView.onTouchEvent(TextView.java:6541)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.View.dispatchTouchEvent(View.java:3709)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-03 12:33:47.975: E/AndroidRuntime(244): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
01-03 12:33:47.975: E/AndroidRuntime(244): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
01-03 12:33:47.975: E/AndroidRuntime(244): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.os.Handler.dispatchMessage(Handler.java:99)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.os.Looper.loop(Looper.java:123)
01-03 12:33:47.975: E/AndroidRuntime(244): at android.app.ActivityThread.main(ActivityThread.java:4363)
01-03 12:33:47.975: E/AndroidRuntime(244): at java.lang.reflect.Method.invokeNative(Native Method)
01-03 12:33:47.975: E/AndroidRuntime(244): at java.lang.reflect.Method.invoke(Method.java:521)
01-03 12:33:47.975: E/AndroidRuntime(244): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
01-03 12:33:47.975: E/AndroidRuntime(244): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
01-03 12:33:47.975: E/AndroidRuntime(244): at dalvik.system.NativeStart.main(Native Method)
01-03 12:33:47.985: I/dalvikvm(244): threadid=7: reacting to signal 3
01-03 12:33:48.006: I/dalvikvm(244): Wrote stack trace to '/data/anr/traces.txt'
было бы замечательно, если бы кто-то мог взглянуть.
твое фло