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);
Related
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.
java.lang.NoClassDefFoundError: java.util.Objects[],but i don't know how to solve it,please help me!!!!
java.lang.NoClassDefFoundError: java.util.Objects[]
at com.yingshibao.gsee.fragments.DuoBeiClassFragment1.newInstance(DuoBeiClassFragment1.java)
onCreateLoader(DuoBeiClassFragment1.java)
onLoadFinished(DuoBeiClassFragment1.java)
getDownloadClassRoom(DuoBeiClassFragment1.java)
onLoaderReset(DuoBeiClassFragment1.java)
onLoadFinished(DuoBeiClassFragment1.java)
lambda$initSchedule$179(DuoBeiClassFragment1.java)
access$000(DuoBeiClassFragment1.java)
access$200(DuoBeiClassFragment1.java)
at com.yingshibao.gsee.fragments.DuoBeiClassFragment1$$Lambda$1.onClick(DuoBeiClassFragment1.java)
at android.view.View.performClick(View.java:4240)
at android.view.View$PerformClick.run(View.java:17729)
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:5166)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:768)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(NativeStart.java)
Take a look at this post maybe it will help you ....
java.lang.NoClassDefFoundError: java.util.Objects
The exception is thrown because all static methods of java.util.Objects are available above API 19 (Android 4.4.+).
in API 10 (Android 2.3.+) that method doesn't exist in that Android version and NoClassDefFoundError is thrown.
If you want to check api level programmatically you can do:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// your code available only above api 19
} else {
// compatibility code
}
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
Running this in my android device gives me these errors.
Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lffvideolivewallpaper/frankandrobot/com/NativeCalls;
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x40ed42a0)
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at ffvideolivewallpaper.frankandrobot.com.VideoLiveWallpaper.onSharedPreferenceChanged(VideoLiveWallpaper.java:144)
at ffvideolivewallpaper.frankandrobot.com.VideoLiveWallpaper.onCreate(VideoLiveWallpaper.java:78)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2404)
at android.app.ActivityThread.access$1600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1309)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load avcore: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at ffvideolivewallpaper.frankandrobot.com.NativeCalls.(NativeCalls.java:42)
... 13 more
I think these errors are related to Android NDK. Can anyone guide me on this, keeping in mind that I have no prior knowledge of Android NDK and how it works.
This may happen if we install the app on a device where the previous version was already installed we always get this kind of error:
Just look at this similar problem : https://groups.google.com/d/topic/android-ndk/YmKly4zEMQ0/discussion
I found the reason why I was getting this error, because I did not build the native libraries. I used ndk-build and the errors got resolved.
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.