After upgrading the eclipse juno to the latest version of ADT i am having trouble with a project to compile even though it was working fine earlier.
Could not find class 'com.fasterxml.jackson.databind.ObjectMapper'
The full log is as follow
05-29 12:04:04.553: E/dalvikvm(362): Could not find class 'com.fasterxml.jackson.databind.ObjectMapper', referenced from method me.agilani.android.gmitthric.SplashScreenActivity.callWebService
05-29 12:04:07.234: E/AndroidRuntime(362): FATAL EXCEPTION: main
05-29 12:04:07.234: E/AndroidRuntime(362): java.lang.NoClassDefFoundError: com.fasterxml.jackson.databind.ObjectMapper
05-29 12:04:07.234: E/AndroidRuntime(362): at me.agilani.android.gmitthric.SplashScreenActivity.callWebService(SplashScreenActivity.java:134)
05-29 12:04:07.234: E/AndroidRuntime(362): at me.agilani.android.gmitthric.SplashScreenActivity.access$3(SplashScreenActivity.java:89)
05-29 12:04:07.234: E/AndroidRuntime(362): at me.agilani.android.gmitthric.SplashScreenActivity$1.run(SplashScreenActivity.java:65)
05-29 12:04:07.234: E/AndroidRuntime(362): at android.os.Handler.handleCallback(Handler.java:587)
05-29 12:04:07.234: E/AndroidRuntime(362): at android.os.Handler.dispatchMessage(Handler.java:92)
05-29 12:04:07.234: E/AndroidRuntime(362): at android.os.Looper.loop(Looper.java:123)
05-29 12:04:07.234: E/AndroidRuntime(362): at android.app.ActivityThread.main(ActivityThread.java:3683)
05-29 12:04:07.234: E/AndroidRuntime(362): at java.lang.reflect.Method.invokeNative(Native Method)
05-29 12:04:07.234: E/AndroidRuntime(362): at java.lang.reflect.Method.invoke(Method.java:507)
05-29 12:04:07.234: E/AndroidRuntime(362): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-29 12:04:07.234: E/AndroidRuntime(362): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-29 12:04:07.234: E/AndroidRuntime(362): at dalvik.system.NativeStart.main(Native Method)
i have tried upgrading the jackson libraries to 2.2.1 but no avail...
can someone please help with this...
First of all, check your buildpath, make sure that the lib had be added to buildpath. In addtion, clean the project.
After upgrading the IDE somehow, the Build path got effected. Took the external jars off the build path, Cleaned the solution multiple times and then added them again. Did the trick.
for me org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; and MappingJacksonHttpMessageConverter got mixed up with fasterxml jackson so after gradle clean things are working now
Related
I get a project from other developer to fix minor issues in app, when I'm running my app on device I'm getting an error:
15142-15142/com.etripconcept E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.crashlytics.android.answers.Answers
at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:224)
at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:207)
at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:202)
at com.etripconcept.SplashScreenActivity.onCreate(SplashScreenActivity.java:16)
at android.app.Activity.performCreate(Activity.java:5163)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)
at android.app.ActivityThread.access$600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
I'm new in Android development, so it may be stupid question, but Google doesn't say anything about it. I use Android Studio 1.2.2 on Win 8.1
I am wondering if this is some bug in Android Studio or I am simply lack od knowladge but straight to the point.
I am writing simple client-server via bluetooth app on android. At some point I encoured following problem:
07-11 18:59:20.553 10364-10364/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not find a method parujUrzadzenia(View) in the activity class com.example.pc.klient_serwerbluetooth.Klient for onClick handler on view class android.widget.Button with id 'button6'
at android.view.View$1.onClick(View.java:3775)
at android.view.View.performClick(View.java:4421)
at android.view.View$PerformClick.run(View.java:18190)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoSuchMethodException: parujUrzadzenia [class android.view.View]
at java.lang.Class.getConstructorOrMethod(Class.java:460)
at java.lang.Class.getMethod(Class.java:915)
at android.view.View$1.onClick(View.java:3768)
at android.view.View.performClick(View.java:4421)
at android.view.View$PerformClick.run(View.java:18190)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
07-11 19:34:00.498 449-522/? E/ActivityManager﹕ The package com.example.pc.klient_serwerbluetooth is not found. Failure starting process com.example.pc.klient_serwerbluetooth
For what I understand Android Studio can't find method parujUrzadzenia(View) that is marked in button6's properties as onClick method...the funny thing is i deleted this button in my way of solving this problem.
I can't post picture of my project due to low reputation but like I said. I've deleted the reference to method from .xml and method from .java file and got an error saying that there is no required onClick method. So I deleted this whole button and still got this error.
Any advices will be greatly appreciated.
Decided to use Scandit SDK to get the barcode scanning feature in my app. Unfortunately, since I'm relatively new to Android development and Java in general I've run into a few issues that I can't seem to work out. The demo that Scandit provided doesn't give any errors(runs fine) but crashes when I try to start it up (pressing a button from one activity is meant to start it up). I've tried reading the logcat and googling a solution to the problems but I'm not getting the right solutions. Does anyone have an idea of what I'm doing wrong?
Logcat is provided below:
10-08 23:30:00.807 21563-21563/com.kwesimbia.management D/AndroidRuntime? Shutting down VM
10-08 23:30:00.807 21563-21563/com.kwesimbia.management W/dalvikvm? threadid=1: thread exiting with uncaught exception (group=0x40aa4228)
10-08 23:30:00.817 21563-21563/com.kwesimbia.management E/AndroidRuntime? FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3082)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3077)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com.kwesimbia.management.ScanditSDKDemoSimple
at com.kwesimbia.management.Activity_D.initiateCodeScan(Activity_D.java:63)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3077)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger? App crashed!
Process: com.kwesimbia.management
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger? App crashed!
Package: com.kwesimbia.management v1 (1.0)
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger?
Application Label: firstapp
10-08 23:30:00.827 32726-587/? W/ActivityManager?
Force finishing activity com.kwesimbia.management/.Activity_D
I came across this problem as well, my solution was to extract the library files and put them as their files in the lib folder
The library basically isn't being exported with it
EDIT
So I checked out my project, basically I did these things:
In the libs folder I have a new folder called armeabi and inside that I have libscanditsdk-android-3.3.1.so
Then in my build path I have also referenced the jar file that they provide:
<classpathentry exported="true" kind="lib" path="C:/GIT/Android/FwayScannerProject/FwayScanner/libs/scanditsdk-barcodepicker-android-3.3.1.jar"/>
I have DoubleClick banners in 'MainActivity'(A) and in 'FindActivity'(B).
When I click banner in A - it opens and I'm pressing 'back' button - A appears again and works fine.
When click banner in B - it opens and I'm pressing 'back' - B did not appears. LogCat says:
05-29 16:38:27.542: E/AndroidRuntime(661): FATAL EXCEPTION: main
05-29 16:38:27.542: E/AndroidRuntime(661): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.my.myapp/com.my.myapp.FindActivity}: java.lang.NullPointerException
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.os.Handler.dispatchMessage(Handler.java:99)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.os.Looper.loop(Looper.java:130)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.main(ActivityThread.java:3687)
05-29 16:38:27.542: E/AndroidRuntime(661): at java.lang.reflect.Method.invokeNative(Native Method)
05-29 16:38:27.542: E/AndroidRuntime(661): at java.lang.reflect.Method.invoke(Method.java:507)
05-29 16:38:27.542: E/AndroidRuntime(661): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
05-29 16:38:27.542: E/AndroidRuntime(661): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
05-29 16:38:27.542: E/AndroidRuntime(661): at dalvik.system.NativeStart.main(Native Method)
05-29 16:38:27.542: E/AndroidRuntime(661): Caused by: java.lang.NullPointerException
05-29 16:38:27.542: E/AndroidRuntime(661): at com.my.myapp.FindActivity.onCreate(FindActivity.java:125)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
05-29 16:38:27.542: E/AndroidRuntime(661): ... 11 more
I've put breakpoint at line 125. Surprise - LogCat show exception without reaching breakpoint.
Code in onCreate is:
super.onCreate(savedInstanceState);//line124
m_current = MyApp.sInstance.GetName();//line 125 ========
Update
sInstance is App singleton.
added correct log copy
Update2
Bigger stack trace provided
I have no Idea why I get this error :/
Exception class java.lang.NullPointerException
Source method Jax$7.onClick()
java.lang.NullPointerException
at com.reg.lolsoundboard.Jax$7.onClick(Jax.java:83)
at android.view.View.performClick(View.java:2485)
at android.view.View$PerformClick.run(View.java:9089)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Obviously you are dereferencing a variable in line 83 of the file Jax.java where the variable is null.
java.lang.NullPointerException
at com.reg.lolsoundboard.Jax$7.onClick(Jax.java:83)
If show the relevant code, people may be able to help you.