"Unfortunately, application has stopped" for some version of Android - android

I have an application available on Google Play. Some people told me they were having an issue. When they open the application, it directly crashes and says "Unfortunately, [application name] has stopped".
When I started to program my project, I had the same problem with an Android 4.2.2. I just told me that it was a problem only for this version of Android, because when I used my bother's phone and my friends' phone everything worked. But finally not. People are having the same issue with and Android 5.0 or Android 5.0.2, and maybe some more.
I have few other red lines, but I will show you only the biggest part, which seems suspect. When I launch my app, I get this :
08-19 21:27:35.135 26504-26504/com.histoire_horreur E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.histoire_horreur.Listener.ScrollListener
at com.histoire_horreur.MainActivity.createView(MainActivity.java:59)
at com.histoire_horreur.MainActivity.onCreate(MainActivity.java:47)
at android.app.Activity.performCreate(Activity.java:5122)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1150)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2315)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2403)
at android.app.ActivityThread.access$600(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5391)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Android Studio doesn't underline any line in my code to tell me that this class is not found. ScrollListener is a class I created and it exists. I imported it. Anyway... I decided to delete line 59 to see what happens. When I did, I get a new error :
08-19 21:33:09.317 26953-26953/com.histoire_horreur E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: android.support.v7.view.menu.MenuBuilder
at android.support.v7.app.AppCompatDelegateImplV7.initializePanelMenu(AppCompatDelegateImplV7.java:1232)
at android.support.v7.app.AppCompatDelegateImplV7.preparePanel(AppCompatDelegateImplV7.java:1296)
at android.support.v7.app.AppCompatDelegateImplV7.doInvalidatePanelMenu(AppCompatDelegateImplV7.java:1591)
at android.support.v7.app.AppCompatDelegateImplV7.access$100(AppCompatDelegateImplV7.java:91)
at android.support.v7.app.AppCompatDelegateImplV7$1.run(AppCompatDelegateImplV7.java:130)
at android.os.Handler.handleCallback(Handler.java:800)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5391)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
This error is a mystery for me. I didn't even use MenuBuilder somewhere.
Can you help me because I now don't know where to focus. I searched a lot on StackOverflow and nothing solved my problem. There are a lot of similar errors but with a different log. Some people who had the same issue said it was just a problem of Android 4.2.2. But it is not.

About MenuBuilder problem, you need to change your build.gradle file as I did there :
Then it worked with my Wiko 4.2.2.
About ScrollListener problem, I will create a new subject.

Related

java.lang.NoClassDefFoundError: com.google.api.client.http.apache.ApacheHttpTransport() on some phones Kinvey Android?

The following error is obtained when running my app using the Kinvey client library:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.google.api.client.http.apache.ApacheHttpTransport
at com.kinvey.android.Client$Builder.newCompatibleTransport(Client.java:555)
at com.kinvey.android.Client$Builder.<init>(Client.java:609)
at ch.ethz.nervousnet.trialapp04.MainActivity.onCreate(MainActivity.java:94)
at android.app.Activity.performCreate(Activity.java:5122)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2337)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2425)
at android.app.ActivityThread.access$600(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5422)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:837)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
at dalvik.system.NativeStart.main(Native Method)
The Line in MainActivity class it points to is the following:
Global.setmKinveyClient(new Client.Builder(this.getApplicationContext()).build());
// Client if a library class, not the one I have created
It works on most phones, but on some phones does not work, what could be the cause?
Here is a screen shot of all the libs I have in the project :
Any help is appreciated, thank you.
LoveMeow,
What is the Android version on phones where it is not working? Is it the same version or happens randomly?
Since it is working for you on some phones, all the dependent libraries seem to be added properly. Are there any other warnings that are being thrown?
Thanks,
Pranav
Kinvey Support

Getting uknown error when using mupdf

I've tried to import mupdf to my app, but when I open it, i got some weird error and it force closes. Why? I really don't understand.
this is my logcat:
10-10 15:34:17.802 8657-8657/com.tproductions.Openit E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.tproductions.Openit, PID: 8657
java.lang.UnsatisfiedLinkError: Native method not found: com.artifex.mupdfdemo.MuPDFCore.openFile:(Ljava/lang/String;)J
at com.artifex.mupdfdemo.MuPDFCore.openFile(Native Method)
at com.artifex.mupdfdemo.MuPDFCore.<init>(MuPDFCore.java:68)
at com.artifex.mupdfdemo.MuPDFActivity.openFile(MuPDFActivity.java:204)
at com.artifex.mupdfdemo.MuPDFActivity.onCreate(MuPDFActivity.java:303)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:212)
at android.app.ActivityThread.main(ActivityThread.java:5135)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
at dalvik.system.NativeStart.main(Native Method)
It looks like something has gone wrong in the native build.
It's probably best to retry that; there are instructions here:
http://www.mupdf.com/doc/how-to-build-mupdf-for-android
and here:
http://git.ghostscript.com/?p=mupdf.git;a=blob_plain;f=platform/android/ReadMe.txt;hb=HEAD
It's probably best to use the git code from master - the latest is 1.6, versions prior to 1.5 are unlikely to build cleanly with the current NDKs.

MonkeyTalk Causing VerifyException in Android Activity

I'm trying to integrate MonkeyTalk automation into my pre-existing Android app that is built using gradle.
I followed the steps here: Android Studio and MonkeyTalk? and got the demo app working, but when I run it in my own application I get the following crash on the second screen. Any idea why this happens?
This particular stack trace is using L preview targeting SDK 19, but I've also seen a similar (less detailed) stack trace on a Galaxy S4 with SDK 18 on it.
07-21 15:35:18.394 14642-14642/com.example.android.debug E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.android.debug, PID: 14642
java.lang.VerifyError: Rejecting class com.example.android.activity.main.MainActivity because it failed compile-time verification (declaration of 'com.example.android.activity.main.MainActivity' appears in /data/app/com.example.android.debug-1.apk)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.Class.newInstance(Class.java:1572)
at android.app.Instrumentation.newActivity(Instrumentation.java:1062)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2317)
at android.app.ActivityThread.access$800(ActivityThread.java:143)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1258)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5070)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631)
Any idea what this means? I'm using Dagger for dependency injection, is that why it might not work?
You can try the latest version of the monkeytalk and i guess your problem will not occur again.

Android Camera get parameter issue on commonsguy/cwac-camera

I used commonsguy/cwac-camera for a custom camera view, image capturing is working fine, but when trying to start recording video, the app crashed.
My Stack trace is this,
java.lang.RuntimeException: getParameters failed (empty parameters)
at android.hardware.Camera.native_getParameters(Native Method)
at android.hardware.Camera.getParameters(Camera.java:2112)
at com.commonsware.cwac.camera.CameraView$OnOrientationChange.onOrientationChanged(CameraView.java:658)
at android.view.OrientationEventListener$SensorEventListenerImpl.onSensorChanged(OrientationEventListener.java:143)
at android.hardware.SystemSensorManager$ListenerDelegate$1.handleMessage(SystemSensorManager.java:261)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5391)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Activity is strictly in portrait mode, recording is working fine in MOTO G, but not in Samsung Tab and Micromax, getting same error.
Also I used latest version of "commonsguy/cwac-camera"
One Micromax Device Model is A114 (4.2.2) where i getting the error

Android: NullPointerException on webview

Does anyone have this problem? I am not quite understand how to fix it. Not sure is that my code cause this exception or a bug on a webview.
java.lang.NullPointerException at
android.webkit.WebViewClassic$WebViewInputConnection.setNewText(WebViewClassic.java:587)
at
android.webkit.WebViewClassic$WebViewInputConnection.setComposingText(WebViewClassic.java:327)
at
android.webkit.WebViewClassic$WebViewInputConnection.commitText(WebViewClassic.java:343)
at
com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:279)
at
com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:77)
at android.os.Handler.dispatchMessage(Handler.java:107) at
android.os.Looper.loop(Looper.java:194) at
android.app.ActivityThread.main(ActivityThread.java:5371) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:525) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at
dalvik.system.NativeStart.main(Native Method)
Hi That's an BUG in the AdMob's new GooglePlayServices Library integrated to our latest updates.
I got this from an admob SDK team member from Amy Quispe(AdMob SDK Team)
java.lang.NullPointerException
at android.webkit.WebViewClassic$WebViewInputConnection.setNewText(WebViewClassic.java:587)
at android.webkit.WebViewClassic$WebViewInputConnection.setComposingText(WebViewClassic.java:327)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:333)
I got the same error yesterday, I think it is generated from lib of new google-play-services.jar.
If you observe the snippet, admob update is mandatory to mitigate the issue.

Categories

Resources