Using GoogleApiAvailability class's isGooglePlayServicesAvailable() method causes the App crash - android

Using the following code on my App is causing the App to crash if the device Google Play services version is not updated.
GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();
status = googleAPI.isGooglePlayServicesAvailable(mActivity);
It is crashing on a device with Android OS version 4.2.2 and Google Play Services version 3.1.58( which I have purposefully downgraded , to handle the Google Play Services availaibility check).
Crash Logs is given below,
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.companyname/o.Dt}:
java.lang.NullPointerException
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2249)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
at android.app.ActivityThread.access$700(ActivityThread.java:154)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
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.NullPointerException
at o.Lf.(:191)
at o.Lf.ˊ(:237)
at o.Dt.onCreate(:487)
at android.app.Activity.performCreate(Activity.java:5255)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2213)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299) 
at android.app.ActivityThread.access$700(ActivityThread.java:154) 
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:5306) 
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)
The NullPointer is pointing at some framework class even whose name is obfuscated. SO, any help would be appreciated.

Maybe the error is not in your code. Going by the package name, the error appears to be coming from a publicly available app

Related

Plivo API endpoint Exception In Initializer error

03-24 10:51:22.425 20219-20219/com.mordred.call E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at com.plivo.endpoint.backend.PlivoAppCallback.<init>(PlivoAppCallback.java:114)
at com.plivo.endpoint.BackendListener.<init>(BackendListener.java:28)
at com.plivo.endpoint.Endpoint.initLib(Endpoint.java:150)
at com.plivo.endpoint.Endpoint.<init>(Endpoint.java:47)
at com.plivo.endpoint.Endpoint.newInstance(Endpoint.java:63)
at com.mordred.call.PstnActivity.<init>(PstnActivity.java:46)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
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:1036)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:803)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Native method not found: com.plivo.endpoint.backend.plivoJNI.swig_module_init:()V
at com.plivo.endpoint.backend.plivoJNI.swig_module_init(Native Method)
at com.plivo.endpoint.backend.plivoJNI.<clinit>(plivoJNI.java:108)
at com.plivo.endpoint.backend.PlivoAppCallback.<init>(PlivoAppCallback.java:114) 
at com.plivo.endpoint.BackendListener.<init>(BackendListener.java:28) 
at com.plivo.endpoint.Endpoint.initLib(Endpoint.java:150) 
at com.plivo.endpoint.Endpoint.<init>(Endpoint.java:47) 
at com.plivo.endpoint.Endpoint.newInstance(Endpoint.java:63) 
at com.mordred.call.PstnActivity.<init>(PstnActivity.java:46) 
at java.lang.Class.newInstanceImpl(Native Method) 
at java.lang.Class.newInstance(Class.java:1319) 
at android.app.Instrumentation.newActivity(Instrumentation.java:1068) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135) 
at android.app.ActivityThread.access$700(ActivityThread.java:140) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4921) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511)
I am using the plivo api, but when i open an activity, i get that error above, i know its coming from my endpoint instantiation, i.e i cannot do this
Endpoint endpoint = Endpoint.newInstance(true, this);
but i do not know what to do instead and i do not know what is causing the error
Plivo Sales Engineer here.
What's the processor architecture of the android phone that you're testing on? This error occurs when the libpjplivo.so file is incompatible with the processor architecture.
Please raise a ticket our support portal and we can help you debug this.

A strange Exception about notification: ClassCastException: RemoteViews$SetOnClickPendingIntent cannot be cast to RemoteViews$ReflectionAction

I have encounteredd a problem. I collect a exception message about notification for startForeground. It mainly appears on SamSung GT-I9300, API 15. Is there any clue about it ? Expect your fabulous analysis. Thanks
Bad notification for startForeground: java.lang.ClassCastException:
android.widget.RemoteViews$SetOnClickPendingIntent cannot be cast to
android.widget.RemoteViews$ReflectionAction
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1260)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:137)
android.app.ActivityThread.main(ActivityThread.java:4424)
java.lang.reflect.Method.invokeNative(Native Method)
java.lang.reflect.Method.invoke(Method.java:511)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:592)
dalvik.system.NativeStart.main(Native Method)

webview crashs in 4.1.2 java.lang.IllegalArgumentException: bad parameter

java.lang.IllegalArgumentException: bad parameter
at org.apache.http.client.utils.URLEncodedUtils.parse(URLEncodedUtils.java:139)
at org.apache.http.client.utils.URLEncodedUtils.parse(URLEncodedUtils.java:76)
atandroid.webkit.AccessibilityInjector.getAxsUrlParameterValue(AccessibilityInjector.java:404)
at android.webkit.AccessibilityInjector.shouldInjectJavaScript(AccessibilityInjector.java:323)
at android.webkit.AccessibilityInjector.onPageFinished(AccessibilityInjector.java:282)
at android.webkit.WebViewClassic.onPageFinished(WebViewClassic.java:4259)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:325)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5000)
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:821)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)
This bug has been tracked as https://code.google.com/p/android/issues/detail?id=35100
It's a bug of android 4.1.2.
Quote:
"
Fixed in an internal build, to be released in the next major release.
"

Error report from Google Play: NullPointerException at android.app.ActivityThread

java.lang.NullPointerException
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4093)
at android.app.ActivityThread.access$1400(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1297)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4935)
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:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
This is the report I got in developer console of Google Play Store. from I am unable to reproduce the issue as I am unsure where it's happening in my application. Found none when I searched for similar stacktraces.

How to resolve the error java.lang.ExceptionInInitializerError in Kakao Talk Login sample application?

I've followed the sample application for kakao talk login from developers.kakao console, if I run the sample application, it's working fine, but if I do the same creating new project I'm getting this error:
java.lang.ExceptionInInitializerError
at com.kakao.authorization.accesstoken.GetterAccessToken.makeAccessTokenRequest(GetterAccessToken.java:116)
at com.kakao.authorization.accesstoken.GetterAccessToken.requestAccessToken(GetterAccessToken.java:56)
at com.kakao.LoginActivity.onCreate(LoginActivity.java:78)
at android.app.Activity.performCreate(Activity.java:5326)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2218)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2309)
at android.app.ActivityThread.access$700(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1289)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5317)
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)
What is the error type and how to start resolve it?
It is because you are using facebook sdk and kakao sdk together, there is a session problem in it.
For this just remove Asyn HTTP client libary from build path of you kakao sdk ans it will run fine after that

Categories

Resources