I have been using Mapbox version 4.2.2 as I am not yet prepared to move to Mapbox 5 as a few features from version 4 don't seem to be supported. (In specific Camera Tracking)
I have found that I am getting crashes regarding Android 8 devices.
Caused by java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.sctaylor.map/com.mapbox.mapboxsdk.telemetry.TelemetryService }: app is in background uid UidRecord{3534d78 u0a235 CEM idle procs:1 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1512)
at android.app.ContextImpl.startService(ContextImpl.java:1468)
at android.content.ContextWrapper.startService(ContextWrapper.java:644)
at com.mapbox.mapboxsdk.telemetry.MapboxEventManager.setTelemetryEnabled(MapboxEventManager.java:252)
at com.mapbox.mapboxsdk.telemetry.MapboxEventManager.initialize(MapboxEventManager.java:146)
at com.mapbox.mapboxsdk.MapboxAccountManager.start(MapboxAccountManager.java:50)
at com.sctaylor.map.AnalyticsApplication.onCreate(AnalyticsApplication.java:44)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5821)
at android.app.ActivityThread.-wrap1(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1669)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:251)
at android.app.ActivityThread.main(ActivityThread.java:6580)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
It looks like this is an issue with Android 8's background service restrictions (Need to use a job scheduler). Is there a way to fix this without upgrading to Mapbox 5?
It looks like this is an issue with Android 8's background service
restrictions (Need to use a job scheduler). Is there a way to fix this
without upgrading to Mapbox 5?
You are completely right about the cause of the issue.
The issue was reported here on GitHub, updates will be propagated here.
The clean fix is for Mapbox to implement JobScheduler. However, they have not released the fix yet and I don't know if they will fix it for versions 4.x
As a contemporary fix, they just caught the IllegalStateException while Mapbox still seems to work.
Using the try/catch approach around MapboxAccountManager.start() does not seem to be a good idea because code subsequent to setTelemetryEnabled() would not be executed.
The only workaround I see is degrading the targetSdkVersion to 25.
Related
My app has been working smoothly for the last few months. But since last week I have been getting the following error a lot,
Fatal Exception: java.lang.RuntimeException: Unable to create application com.foo.bar.MyApplication: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librealm-jni.so'. Looked for: [x86], but only found: [].
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5743)
at android.app.ActivityThread.-wrap1()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
This issue has 40 crash events affecting 7 users (My app only has less than 3000 installs).
These are the affected devices,
Nexus 5X
HUAWEI WDGF4587
QEMU Standard PC (Q35 + ICH9, 2009) <= Someone experimenting with my apk?
Motorola One Vision (rooted)
for a similar issue,
someone suggested to use android.bundle.enableUncompressedNativeLibs=false
This blog post says that Android won't be able to load 32- and 64-bit native libraries concurrently. In my app, I'm also using other libraries such as uCrop and my own native codes. The solution he suggested is to simply exclude all 64-bit binaries from your APK.
Does anyone know the implications of the above-mentioned fixes?
You specified the cpu architecture of the response in your project. I think it's a cpu architecture configuration issue.
I am working on an android application with AR elements. When it is redirecting me from the onboarding screen to the AR screen it crashes with the following error.
java.lang.IllegalArgumentException: Could not find tag for key 'org.codeaurora.qcamera3.exposure_metering.exposure_metering_mode')
at android.hardware.camera2.impl.CameraMetadataNative.nativeGetTagFromKeyLocal(Native Method)
at android.hardware.camera2.impl.CameraMetadataNative.setBase(CameraMetadataNative.java:1389)
at android.hardware.camera2.impl.CameraMetadataNative.set(CameraMetadataNative.java:459)
at android.hardware.camera2.impl.CameraMetadataNative.set(CameraMetadataNative.java:463)
at android.hardware.camera2.CaptureRequest$Builder.set(CaptureRequest.java:848)
at dez.a(PG:49)
at gtf.g(PG:104)
at det.a(Unknown Source:12)
at gjw.e(PG:5)
at gnx.run(PG:12)
at gsa.run(PG:2)
at gtc.run(PG:1)
at gsw.f(PG:2)
at gsv.run(PG:6)
Suppressed: gnv: [gpc{Cancelling}#66fb9dc, Dispatchers.IO]
It works fine on android API level 31 and the crash only happens on level 29. Does anybody have any idea what is causing this error?
Apparently it is a device dependent problem and the issue is reported on ARCore github.
https://github.com/google-ar/arcore-android-sdk/issues/1261
since I´ve downloaded the Android 11 update (Samsung Galaxy S10e; also tested with Android SDK´s Emulator running Android 11, same results), the DSP app "Noozxoide EIZO-rewire™ PRO" is always crashing when started. I know that this app was developed for Android 4.0, but it was even working properly on Android 10. I decided to download Android SDK to test in on VM and look at the logcat.
I would like to get the app working because it improves the audio quality perfectly and I don´t know any similar app like this one. I wanted to contact the developers of the app but their e-mail adress does not exist anymore.
I don´t have any experience with developing apk´s, but maybe someone can help me :)
I have already read some logcat explanations and guide to migrating apps to Android 11 on developer.android but it didn´t really help me with this.
Maybe can someone explain to me what´s happening in this logcat part:
2021-02-24 20:21:19.648 10997-10997/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.noozxoidelabs.eizo.rewirepro, PID: 10997
java.lang.RuntimeException: java.lang.NoSuchMethodException: android.media.audiofx.AudioEffect.setParameter [class [B, class [B]
at com.noozxoidelabs.eizo.rewirepro.VSPCoreEngine.updateDsp(VSPCoreEngine.java:231)
at com.noozxoidelabs.eizo.rewirepro.VSPCoreEngine$4.onCallStateChanged(VSPCoreEngine.java:129)
at android.telephony.PhoneStateListener$IPhoneStateListenerStub.lambda$onCallStateChanged$10(PhoneStateListener.java:1185)
at android.telephony.-$$Lambda$PhoneStateListener$IPhoneStateListenerStub$6czWSGzxct0CXPVO54T0aq05qls.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.NoSuchMethodException: android.media.audiofx.AudioEffect.setParameter [class [B, class [B]
at java.lang.Class.getMethod(Class.java:2072)
at java.lang.Class.getMethod(Class.java:1693)
at com.noozxoidelabs.eizo.rewirepro.VSPCoreEngine.updateDsp(VSPCoreEngine.java:226)
at com.noozxoidelabs.eizo.rewirepro.VSPCoreEngine$4.onCallStateChanged(VSPCoreEngine.java:129)
at android.telephony.PhoneStateListener$IPhoneStateListenerStub.lambda$onCallStateChanged$10(PhoneStateListener.java:1185)
at android.telephony.-$$Lambda$PhoneStateListener$IPhoneStateListenerStub$6czWSGzxct0CXPVO54T0aq05qls.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Thanks in advance
PS: sorry for my misstakes in English :)
From the Google Play Store comments for that app, support is no longer available, and due to framework code changes won't work on modern Android
Similar to: Compile error: Cannot find symbol AudioEffect::setParameter in Android Studio
A quick check of the source shows that in old version of Android:
https://android.googlesource.com/platform/frameworks/base/+/5bb8f80/media/java/android/media/audiofx/AudioEffect.java
No annotation was on setParameter(...)
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android11-d1-release/media/java/android/media/audiofx/AudioEffect.java
While in newer ones the setParameter(...) functions is now hidden by #TestApi and throw an exception if not initialized correctly.
Any fix will require developer to update code.
I have the solution you're looking for. I downloaded an app from the Play Store called App Cloner, and ran Noozxoide through this program to create a cloned apk. The cloned app installed perfectly and worked fine on Android 11.
When I launch my app from Android Studio, with Facebook SDK installed on my device, Xiaomi Mi A2, it triggers the same error trhee times. It does not stop the app, but I don't know if I am missing something or simply, it is not important, but in the end, it is an error and I want to clarify it.
I am using Android Studio 3.4.1, Android 9 on the Xiaomi A2 and the new clause in build.gradle file is implementation 'com.facebook.android:facebook-android-sdk:5.1.0'. Error has not appeared before upgrading Facebook SDK.
This is what appears in Logcat:
2019-06-24 18:24:31.202 25105-25136/com.myapp
E/com.facebook.appevents.RestrictiveDataManager:
updateRulesFromSetting failed
org.json.JSONException: End of input at character 0 of
at org.json.JSONTokener.syntaxError(JSONTokener.java:449)
at org.json.JSONTokener.nextValue(JSONTokener.java:97)
at org.json.JSONArray.(JSONArray.java:92)
at org.json.JSONArray.(JSONArray.java:108)
at com.facebook.appevents.RestrictiveDataManager.updateFromSetting(RestrictiveDataManager.java:32)
at com.facebook.internal.FetchedAppSettingsManager.parseAppSettingsFromJSON(FetchedAppSettingsManager.java:323)
at com.facebook.internal.FetchedAppSettingsManager.access$000(FetchedAppSettingsManager.java:63)
at com.facebook.internal.FetchedAppSettingsManager$1.run(FetchedAppSettingsManager.java:181)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
EDIT
The issue has been fixed in version 5.1.1.
Revert to 5.0.3 to get rid of this.
5.1.0 is actually crashing in production at this method (there's a bug report here). GitHub commits of this file show its rather flawed, the method is called from multiple threads concluding to a concurrency crash because it's using a static ArrayList.
Lately the core FB SDK is kinda bloated with useless stuff and low-quality code. The codeless stuff "feature" that simply can't even be turned off is especially a horror to look at. If you don't strictly need the FB SDK in your app, I'd avoid it until they get their shit figured out.
I'm trying to run the barcode-reader example ( https://github.com/googlesamples/android-vision/tree/master/visionSamples/barcode-reader ) as it is on my Nokia 2.1 running Android 8.1.0 and Google Play Services 15.0.90. The camera starts but no barcode is detected and in the logcat I get (continuously while the camera is working) the following error:
2019-02-09 18:17:04.990 3364-3497/com.google.android.gms.samples.vision.barcodereader E/BarcodeNativeHandle: Error Loading module com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0. at com.google.android.gms.dynamite.DynamiteModule.load(Unknown Source:8) at com.google.android.gms.internal.vision.zzl.zzp(Unknown Source:39) at com.google.android.gms.internal.vision.zzl.isOperational(Unknown Source:0) at com.google.android.gms.vision.barcode.BarcodeDetector.isOperational(Unknown Source:2) at com.google.android.gms.vision.Detector.receiveFrame(Unknown Source:16) at com.google.android.gms.samples.vision.barcodereader.ui.camera.CameraSource$FrameProcessingRunnable.run(CameraSource.java:1205) at java.lang.Thread.run(Thread.java:764)
What can I do to be able to run it?
Thanks!
Facing same issue on Nokia 1 Android 8.1.0 Android Go edition.
Seems to be issue with vision API or Google play service issue as mentioned here https://issuetracker.google.com/issues/80454351
Alternately you can use zing library for barcode/qr code scanning, you can try following example, it worked for me.
https://www.androidtutorialpoint.com/basics/learn-by-doing/android-qr-code-scanner-app-tutorial-using-zxing-library/