Android project working on Motodev but crashes on Eclipse - android

I made an android project on Motodev (which is an eclipse plugin itself). But now when I am trying to run the same project on eclipse, the emulator gives me an error the following error:
FATAL EXCEPTION: main E/AndroidRuntime(4711): java.lang.VerifyError: com.tenpearls.namecalling.Activities.SearchContactsActivity
E/AndroidRuntime(4711): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(4711): at java.lang.Class.newInstance(Class.java:1429)
E/AndroidRuntime(4711): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(4711): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
E/AndroidRuntime(4711): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime(4711): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime(4711): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime(4711): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(4711): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(4711): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(4711): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(4711): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(4711): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(4711): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime(4711): at dalvik.system.NativeStart.main(Native Method)

That can be the result when you have compiled against a different library than you are using at runtime.
A good explanation can be had here.
Another possibility is having a duplicate class in the classpath somewhere, such as in a library jar.

Related

Crashlytics NoClassDefFoundError: com.crashlytics.android.answers.Answers

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

android VerifyError

i'm getting this message when i run my application i don't know why i'm getting it could any one help me. here is the logcat.
java.lang.VerifyError: com.kosh.me.Smaller
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1429)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
This happens when the build library classes conflict with those at run-time. Try performing a Clean of your project followed by a build.

Getting ClassNotFound Error after updating from ADT 16 to ADT 17

My Application was working fine. But as soon as i updated from ADT 16 to ADT 17 then i am getting this error
Unable to resolve superclass of Lcom/my/app/MyActivity; (130)
Link of class 'Lcom/my/app/MyActivity;' failed
D/AndroidRuntime(328): Shutting down VM
W/dalvikvm(328): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
E/AndroidRuntime(328): FATAL EXCEPTION: main
E/AndroidRuntime(328): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.my.app/com.my.app.MyActivity}: java.lang.ClassNotFoundException: com.my.app.MyActivity in loader dalvik.system.PathClassLoader[/data/app/com.my.app-1.apk]
E/AndroidRuntime(328): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
E/AndroidRuntime(328): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime(328): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime(328): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime(328): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(328): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(328): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(328): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(328): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(328): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(328): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime(328): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(328): Caused by: java.lang.ClassNotFoundException: com.my.app.MyActivity in loader dalvik.system.PathClassLoader[/data/app/com.my.app-1.apk]
E/AndroidRuntime(328): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
E/AndroidRuntime(328): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
E/AndroidRuntime(328): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
E/AndroidRuntime(328): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(328): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
E/AndroidRuntime(328): ... 11 more
How to resolve it?
This issue occurs because the "lib" folder is renamed to "libs" now by Android People.
And as soon as we place our external jars to this "libs" folder then it will automatically be added to the build path of the application.

AdWhirl with Admob bug fix

Updated to the latest version of AdWhirl and AdMob SDK but getting a known error from the AdMob SDK in Android 2.1-update1. Found in this thread https://groups.google.com/forum/#!topic/google-admob-ads-sdk/cNxRgIUHJH0
but it refers to only and AdMob fix not AdWhirl any clue what changes can be made to the AdWhirl SDK to fix this?
Thanks In Advance!
java.lang.NullPointerException
at android.webkit.WebView.getSettings(WebView.java:2791)
at android.webkit.WebView.onWindowFocusChanged(WebView.java:3616)
at android.view.View.dispatchWindowFocusChanged(View.java:3764)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:754)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1819)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4370)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
How about this one:
java.lang.NullPointerException
at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:227)
at com.adwhirl.AdWhirlLayout.access$3(AdWhirlLayout.java:215)
at com.adwhirl.AdWhirlLayout$HandleAdRunnable.run(AdWhirlLayout.java:410)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
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:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)
The issue is not in the AdWhirl code, or even the AdMob code. This is a NullPointerException in the Android WebView, and there is no known workaround for the AdMob/AdWhirl code. This shouldn't be happening that often, but if it really is a deal breaker, you may want to turn down the number of requests you're sending to AdMob.
Yes, I also have this problem.
My workaround: extend AdWhirlLayout, override dispatchWindowFocusChanged and every other method that have this exception occurring and catch the exception.

NetworkConnectivityListener class not found on UPC300-2.2 Viewsonic G-Tablet

I am getting this error in my application, and this happens only on UPC300-2.2 Viewsonic G-Tablet. All answers I've found so far (including this one) adviced on putting
<uses-permission android:name="android.permission.INTERNET"/>
to the manifest file, but it doesn't help.
Here is the complete stacktrace:
java.lang.NoClassDefFoundError: android.net.NetworkConnectivityListener
at
com.google.android.maps.MapActivity.onCreate(MapActivity.java:199)
at
myapp.Activity.ActivityMapSearch.onCreate(ActivityMapSearch.java:99)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at
android.os.Handler.dispatchMessage(Handler.java:99)
at
android.os.Looper.loop(Looper.java:123)
at
android.app.ActivityThread.main(ActivityThread.java:4627)
at
java.lang.reflect.Method.invokeNative(Native
Method) at
java.lang.reflect.Method.invoke(Method.java:521)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at
dalvik.system.NativeStart.main(Native
Method)
If that is TRUE, you can grab the source code of the class from the Android Source and add it yourself

Categories

Resources