Facebook account kit is not working on low android versions - android

I have integrated facebook account kit in my app and it works perfectly fine on devices with higher android versions ( nougat, marshmallw, lollipop etc). On low android api's ( I have tested on huawei h3u10 android 4.2.2 ) it shows the following error when I try to change the country code:
04-25 20:31:04.664 3670-3670/com.chaatgadrive.arif.chaatgadrive
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at android.view.ViewGroup$LayoutParams.(ViewGroup.java:5729)
at com.facebook.accountkit.ui.PhoneCountryCodeAdapter.getDropDownView(PhoneCountryCodeAdapter.java:273)
at android.support.v7.widget.AppCompatSpinner$DropDownAdapter.getDropDownView(AppCompatSpinner.java:650)
at android.support.v7.widget.AppCompatSpinner$DropDownAdapter.getView(AppCompatSpinner.java:644)
at android.support.v7.widget.DropDownListView.measureHeightOfChildrenCompat(DropDownListView.java:320)
at android.support.v7.widget.ListPopupWindow.buildDropDown(ListPopupWindow.java:1300)
at android.support.v7.widget.ListPopupWindow.show(ListPopupWindow.java:646)
at android.support.v7.widget.AppCompatSpinner$DropdownPopup.show(AppCompatSpinner.java:800)
at android.support.v7.widget.AppCompatSpinner.performClick(AppCompatSpinner.java:436)
at com.facebook.accountkit.ui.AccountKitSpinner.performClick(AccountKitSpinner.java:61)
at android.view.View$PerformClick.run(View.java:17660)
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:5433)
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:924)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:691)
at dalvik.system.NativeStart.main(Native Method)
I have no clue what is going on. Please help.

Related

Firebase Authentication causing Android fatal exception

I just finished integrating Firebase real time data base and Authentication into my Android Studio application. It ran successfully two or three times on my Google Nexus 7 genymotion emulator that has google play services on it. Then I tried launching it again and I started getting the below error:
06-25 16:50:46.994 7699-7699/
com.careersvirtualsolutions.uprate E/AndroidRuntime:
FATAL EXCEPTION: main
java.lang.NullPointerException
at com.google.firebase.auth.FirebaseAuth$1.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
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:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
I think this has something to do with the Firebase Authentication SDK but I am not sure.
Do you know what this is caused by? How can I solve it?
I actually figured it out, the problem was with the AuthStateListener.
So if you're having a similar issue, try testing your project with the AuthStateListener commented out and see if it launches without crashing. If it does you can then figure out how to replace the existing listener.
Hope this helps in some way!

How to handle Crash with setHasTransientState() on android 4.0.3?

I am seeing this crash on android 4.0.3 version. All above versions are working fine. How to solve this crash ?
java.lang.NoSuchMethodError: android.view.View.setHasTransientState
at com.techmash.playo.fragments.AddFavAreaFragment$AreaAdapter$ViewHolder.onClick(AddFavAreaFragment.java:338)
at android.view.View.performClick(View.java:3524)
at android.view.View$PerformClick.run(View.java:14194)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4476)
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:816)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:583)
at dalvik.system.NativeStart.main(Native Method)
This method available in SDK starting API level 16. You can use ViewCompat from support library for previous versions.
ViewCompat.setHasTransientState(view, true);

suddenly started receiving NoClassDefFoundError

My android app is more than a year on Play now and everything was OK.
About 2 weeks ago users started complaining on crashes. Than was strange cause I haven't changed anything for some time now.
Yesterday, after finally taking a look on crash logs, I've noticed huge number NoClassDefFoundError being thrown, which led to crashes in the app.
3 strange things:
1) GameplayFragment$TimerUpdater is of course present.
1) The app has not been updated for months.
2) Apparently only GINGERBREAD versions crash
Has anybody experienced this?
Thanks
[main] java.lang.NoClassDefFoundError: com.ivygames.morskoiboi.ui.GameplayFragment$TimerUpdater at
com.ivygames.morskoiboi.ui.GameplayFragment.startTimer(GameplayFragment.java:336) at
com.ivygames.morskoiboi.ui.GameplayFragment.access$10(GameplayFragment.java:333) at
com.ivygames.morskoiboi.ui.GameplayFragment$UiProxy$1.run(GameplayFragment.java:495) 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) Caused by: java.lang.ClassNotFoundException: com.ivygames.morskoiboi.ui.GameplayFragment$TimerUpdater in loader dalvik.system.PathClassLoader[/data/app/com.ivygames.morskoiboi-1.apk] at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) at
java.lang.ClassLoader.loadClass(ClassLoader.java:551) at
java.lang.ClassLoader.loadClass(ClassLoader.java:511) ... 12 more (BOARD=codina; BOOTLOADER=unknown; BRAND=samsung; CPU_ABI=armeabi-v7a; DEVICE=GT-I8160; DISPLAY=GINGERBREAD.XXLL2; HARDWARE=samsung; HOST=DELL205; ID=GINGERBREAD; MANUFACTURER=samsung; MODEL=GT-I8160; PRODUCT=GT-I8160; USER=dpi; SDK=10)
Please see minimum sdk version required you can set it to lower android version i.e 7 or 8

Clockwork package installer stopped

Recently, I've been coding an APP which could work for an Android Device and an Android Wearable.
Today, I finished developments, and I've created a production APK following http://developer.android.com/training/wearables/apps/packaging.html tutorial.
However, when I install APK on a device, it works, but it doesn't get pushed to device.
Device crashes with message:
This is the stacktrace returned by Wearable:
08-04 21:53:47.957 914-914/com.google.android.clockwork.packageinstaller E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.google.android.clockwork.packageinstaller, PID: 914
java.lang.NullPointerException
at java.util.jar.Manifest.read(Manifest.java:187)
at java.util.jar.Manifest.<init>(Manifest.java:106)
at java.util.jar.StrictJarFile.<init>(StrictJarFile.java:65)
at android.content.pm.PackageParser.collectManifestDigest(PackageParser.java:594)
at com.google.android.clockwork.packageinstaller.PackageUtil.getPackageInfo(PackageUtil.java:76)
at com.google.android.clockwork.packageinstaller.PackageInstallerService.installPackage(PackageInstallerService.java:144)
at com.google.android.clockwork.packageinstaller.PackageInstallerService.access$000(PackageInstallerService.java:29)
at com.google.android.clockwork.packageinstaller.PackageInstallerService$1.handleMessage(PackageInstallerService.java:55)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5026)
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:777)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)
I don't really know how to debug this.
APP works perfectly when pushed via ADB.
Tell me if you do need any further info.
Thanks.
Well... Today it worked.
What did I do:
Clean
Removed old APK generated (.....\mobile\build\outputs\apk)
Compile via gradle via script "assembleRelease"
Now it works.

Classnotfound exception for working app

I have a strange issue.I developed an android application with scan functionality.I reused some zxing code code for the scanning section. My app is working fine for all the device and emulater too.But after I uploaded it in market I am getting error on scan portion.My error report is
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:2191)
at android.view.View.performClick(View.java:2532)
at android.view.View$PerformClick.run(View.java:9291)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:4293)
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:849)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
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:507)
at android.view.View$1.onClick(View.java:2186)
... 11 more
Caused by: java.lang.ExceptionInInitializerError
at com.imotiva.Menu1.points(Menu1.java:46)
... 14 more
Caused by: java.lang.NoClassDefFoundError: com.qr.decoding.ResultMetadataType
at com.qr.scanning.CaptureActivity.<clinit>(CaptureActivity.java:92)
... 15 more
Still my code code is working in device but the same app in the market don't. Please help me friends...
At last I found the solution for my problem.gtumca-MAC's solution Android update 17 seems incompatible with external Jars worked for me.Created one folder named libs and add my core.jar .Now it's working fine.Thanks all.

Categories

Resources