Tinylog Android, VerifyError exception - android

After updating tinylog to version 2.5.0-M1.1 \ 2.5.0-M2, On Android 4.4 API 19 Started throwing VerifyError exceptions as soon as ThreadContext.put() or org.tinylog.Logger.tag() is called. On other versions of android everything is fine
Translation to version 2.4.1 helps. But I need to use DynamicPolicy
I did not find the minimum version of the API in the documentation. From the application side, I could not get around the exception. Can you please tell me if this can be fixed or version 2.5 is not supported on android 4.4?
Here is the full exception:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ru.wsoft.push.sample, PID: 6609
java.lang.VerifyError: org/tinylog/configuration/JndiValueResolver
at org.tinylog.configuration.Configuration.<clinit>(Configuration.java:64)
at org.tinylog.provider.ProviderRegistry.loadLoggingProvider(ProviderRegistry.java:87)
at org.tinylog.provider.ProviderRegistry.<clinit>(ProviderRegistry.java:39)
at org.tinylog.ThreadContext.<clinit>(ThreadContext.java:32)
at ru.wings.push.sdk.logging.b.a(Unknown Source)
at ru.wings.push.sdk.logging.b.a(Unknown Source)
at ru.wings.push.sdk.logging.b.a(Unknown Source)
at e.a.a(Unknown Source)
at e.a.$r8$lambda$a3WCZYd0yZju55XeNNLHv5MIHVY(Unknown Source)
at e.a$$ExternalSyntheticLambda0.onComplete(Unknown Source)
at com.google.android.gms.tasks.zzj.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
enter code here

This bug is fixed in tinylog 2.5.0-M2.1: https://tinylog.org/v2/2022/06/update-for-second-milestone-2/
Thank you for reporting this bug! Please test this version and let me know, whether it works for you.

Related

App Crashing for lower than lollipop while setting up Digits

FATAL EXCEPTION: mainProcess: com.easy.easypackage, PID: 17362
java.lang.NoClassDefFoundError: io.fabric.sdk.android.InitializationTask
at io.fabric.sdk.android.Kit.<init>(Kit.java:45)
at com.twitter.sdk.android.core.TwitterCore.<init>(TwitterCore.java:69)
at com.twitter.sdk.android.core.TwitterCore.<init>(TwitterCore.java:63)
at com.easy.easypackage.utils.AppApplication.onCreate(AppApplication.java:22)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4730)
at android.app.ActivityThread.access$1600(ActivityThread.java:175)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1368)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
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:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
I have setup digits and everything works fine for lolipop and above version devices but crashes on lower version devices from kitkat.
Todd from Fabric. It is important to note that Digits 2.0 supports Android 14+. Please do not upgrade to Digits 2.0 if your project needs to be built for Android versions less than 14. Check out this page for details.

Updating Android Studio to version 2.2 and project not run

My project run normally in Android Studio version 2.1.2.In my project used Google map when I update AS to version 2.2 project not run (I do not use fire base but in log this error shown)
this is error log:
java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions
at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1591)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1562)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:4818)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4413)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4353)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5045)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
I was stuck with the same error for 2-3 days after i updated my Android Studio. There are many similar error questions on stack overflow. But nothing worked.
To solve it i created a new project in android studio. Copied all my code and dependencies to the new project and it worked for me.
And follow this link stackoverflow.com/a/37364044/6812027 and try to implement methods given.

Fatal Exception: java.lang.ExceptionInInitializerError with AdMob SDK

I got 51 app crashes in 3 days with this crash report:
Fatal Exception: java.lang.ExceptionInInitializerError
at hrh.(:com.google.android.gms)
at hrh.(:com.google.android.gms)
at hqu.(:com.google.android.gms)
at hrb.(:com.google.android.gms)
at com.google.android.gms.chimera.container.GmsModuleFinder.b(:com.google.android.gms:437)
at com.google.android.gms.chimera.container.DynamiteLoaderImpl.getModuleVersion2(:com.google.android.gms:43)
at krn.onTransact(:com.google.android.gms:83)
at android.os.Binder.transact(Binder.java:361)
at aqb.a(:com.google.android.gms.DynamiteModulesA:155)
at apn.a(:com.google.android.gms.DynamiteModulesA:293)
at apo.a(:com.google.android.gms.DynamiteModulesA:97)
at app.a(:com.google.android.gms.DynamiteModulesA:108)
at apn.a(:com.google.android.gms.DynamiteModulesA:216)
at mu.(:com.google.android.gms.DynamiteModulesA)
at mu.a(:com.google.android.gms.DynamiteModulesA:32)
at com.google.android.gms.ads.internal.overlay.bb.a(:com.google.android.gms.DynamiteModulesA:21)
at com.google.android.gms.ads.internal.zzb.zza(:com.google.android.gms.DynamiteModulesA:537)
at com.google.android.gms.ads.internal.zzb.zza(:com.google.android.gms.DynamiteModulesA:144)
at com.google.android.gms.ads.internal.ClientApi.retainReference(:com.google.android.gms.DynamiteModulesA:312)
at com.google.android.gms.ads.internal.zzn.zza(:com.google.android.gms.DynamiteModulesA:116)
at com.google.android.gms.ads.internal.client.zzz.onTransact(:com.google.android.gms.DynamiteModulesA:81)
at android.os.Binder.transact(Binder.java:361)
at com.google.android.gms.ads.internal.client.zzu$zza$zza.zzaM(Unknown Source)
at com.google.android.gms.ads.internal.client.zzab.destroy(Unknown Source)
at com.google.android.gms.ads.BaseAdView.loadAd(Unknown Source)
at com.google.android.gms.ads.AdView.resume(Unknown Source)
at club.androidy.callcontrolfree.Activities.MainActivity.onCreate(MainActivity.java:182)
at android.app.Activity.performCreate(Activity.java:5289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2186)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2272)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5135)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.NullPointerException
at hbu.a(:com.google.android.gms:1246)
at hbr.b(:com.google.android.gms:198)
at com.google.android.gms.common.threads.internal.GlobalExecutorsImpl.(:com.google.android.gms)
at hrh.(:com.google.android.gms)
at hrh.(:com.google.android.gms)
at hqu.(:com.google.android.gms)
at hrb.(:com.google.android.gms)
at com.google.android.gms.chimera.container.GmsModuleFinder.b(:com.google.android.gms:437)
at com.google.android.gms.chimera.container.DynamiteLoaderImpl.getModuleVersion2(:com.google.android.gms:43)
at krn.onTransact(:com.google.android.gms:83)
at android.os.Binder.transact(Binder.java:361)
at aqb.a(:com.google.android.gms.DynamiteModulesA:155)
at apn.a(:com.google.android.gms.DynamiteModulesA:293)
at apo.a(:com.google.android.gms.DynamiteModulesA:97)
at app.a(:com.google.android.gms.DynamiteModulesA:108)
at apn.a(:com.google.android.gms.DynamiteModulesA:216)
at mu.(:com.google.android.gms.DynamiteModulesA)
at mu.a(:com.google.android.gms.DynamiteModulesA:32)
at com.google.android.gms.ads.internal.overlay.bb.a(:com.google.android.gms.DynamiteModulesA:21)
at com.google.android.gms.ads.internal.zzb.zza(:com.google.android.gms.DynamiteModulesA:537)
at com.google.android.gms.ads.internal.zzb.zza(:com.google.android.gms.DynamiteModulesA:144)
at com.google.android.gms.ads.internal.ClientApi.retainReference(:com.google.android.gms.DynamiteModulesA:312)
at com.google.android.gms.ads.internal.zzn.zza(:com.google.android.gms.DynamiteModulesA:116)
at com.google.android.gms.ads.internal.client.zzz.onTransact(:com.google.android.gms.DynamiteModulesA:81)
at android.os.Binder.transact(Binder.java:361)
at com.google.android.gms.ads.internal.client.zzu$zza$zza.zzaM(Unknown Source)
at com.google.android.gms.ads.internal.client.zzab.destroy(Unknown Source)
at com.google.android.gms.ads.BaseAdView.loadAd(Unknown Source)
at com.google.android.gms.ads.AdView.resume(Unknown Source)
at club.androidy.callcontrolfree.Activities.MainActivity.onCreate(MainActivity.java:182)
at android.app.Activity.performCreate(Activity.java:5289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2186)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2272)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5135)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(NativeStart.java)
It's related to AdMob SDK I think
It's happening on all phones with any android version
I'm using SDK version 8.4.0 as the latest version doesn't deliver ads to devices that doesn't have google play services installed.
compile 'com.google.android.gms:play-services-ads:8.4.0'
The line that causes the issue is
mAdView.loadAd(adRequest);
I tried to just catch the exception with try/catch but it seems that's not working because the app is still crashing.
How to solve this.
Thanks in Advance
As Mike Odie said it seems it's a bug and they are trying to handle it.
You can post your logcat and follow the issue here:
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/jXQW4gwUEDs
I wanted to put it in an answer in case anyone didn't notice Mike's comment.
Edit:
According to this comment of Vu Chau a member of Mobile Ads SDK Team in 15 Jul
The fix is included in the rollout of Google Play services that is scheduled to be 100% complete towards the end of the month. So, the fix has been live, and as the month draws to a close, you should see the frequency of the crashes gradually decreasing.
I will continue monitoring the rollout progress and let you know if there is any change.
Vu Chau
Mobile Ads SDK Team
So the fix is live now and I already noticed that crashes were stopped.
Thanks.

Apache Log4j in Android gives exception java.lang.VerifyError: org/apache/log4j/config/PropertySetter

I am trying to integrate Flickr in android using the Flickr4Java library. Flickr4Java uses Log4j for logging. So when I try to create an instance of flickr, something like Flickr flickr = new Flickr(apiKey, sharedSecret, new REST()); I get the following stack trace
05-12 01:24:28.714 8449-8449/edu.sdsu.cs.sharepic E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: edu.sdsu.cs.sharepic, PID: 8449
java.lang.VerifyError: org/apache/log4j/config/PropertySetter
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:805)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:117)
at com.flickr4java.flickr.REST.<clinit>(REST.java:46)
at edu.sdsu.cs.sharepic.model.Flickr1.<init>(Flickr1.java:28)
at edu.sdsu.cs.sharepic.activity.SelectProfileActivity.init(SelectProfileActivity.java:75)
at edu.sdsu.cs.sharepic.activity.SelectProfileActivity.onCreate(SelectProfileActivity.java:41)
at android.app.Activity.performCreate(Activity.java:5248)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5086)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
I am guessing it has got something to do with configuration of the log4j library, but don't know how to solve the problem. Any help will be much appreciated.
Log4j uses apis from java.beans that is missing in android.
Try this library https://code.google.com/archive/p/android-logging-log4j/
I have yet to look at it tough

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.

Categories

Resources