My app crashes when I try to run it. I don't know what could be causing this error... It might be related to my previous question but that post wasn't very good so I'll post the new error here.
FATAL EXCEPTION: main
Process: com.myapp, PID: 12693
java.lang.NoSuchFieldError: No static field AppCompatTheme of type [I in class Landroid/support/v7/appcompat/R$styleable; or its superclasses (declaration of 'android.support.v7.appcompat.R$styleable' appears in /data/data/com.myapp/files/instant-run/dex/slice-slice_4_13f90a0ab4d497a8a87e7463d225d6b3993606ba-classes.dex)
at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:336)
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:309)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:273)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.myapp.activity.MainActivity.onCreate(MainActivity.java:24)
at android.app.Activity.performCreate(Activity.java:6374)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2743)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2855)
at android.app.ActivityThread.access$900(ActivityThread.java:181)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6117)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
I can't find any information on this error anywhere else, which is really weird.
I ran in to this error now when upgrading my build tools from 23.0.1 to 23.0.2. I spent an hour investigating how I can solve this problem (I did several cleans and rebuilds and none worked).
Eventually, I took 19lymers advice and deleted the app and reinstalled it and then it got fixed.
EDITED:
I don't know whether this is also related or not but before I did the deletion, my app was already buggy - icons which were suppose to be displayed in one location ended up displaying in another location. I think the resource.xml got corrupted. When that happens, best to delete and reinstall. That's the quickest way to solve this issue.
Related
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.
I am using react native. I am getting the crashes on crashlytics with the error INVALID_STATE_ERR.I am using FireBase Crashlytics. I am also using MQTT client for making web socket connection.
I am not able to figure out the reason of crashing the app. Is it due to the MQTT WebSockets or due to the error occurring on javascript thread? I am also not getting any relevant message from the stack trace either.
I am pasting my Stack Trace below.
Fatal Exception: com.facebook.react.common.JavascriptException: INVALID_STATE_ERR, stack:
value#79:1340
_socket_send#557:21101
_on_socket_open#557:16408
<unknown>#557:628
value#63:1501
<unknown>#79:4566
value#32:1363
value#18:3559
<unknown>#18:1044
value#18:2986
value#18:1016
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Method.java)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Can I get more insight to fix this issue?
According to this Wix GitHub issue, it is caused by:
Too many views on older phones. RNN added a few nested views, but it appears I may have too many anyways.
That issue links to a pull request on React Native's GitHub repo, which should now be merged in. It mentions the issue is on pre-API 21, so I suggest you try your code on later APIs and see if it persists.
Either way, reducing the number of views (or requests, in this case?) seems a good first step.
Of course understanding that Crosswalk is no longer being updated, I have encountered a pretty notable issue that I don't really know what to do with. Ever since I updated my Android apps' Crosswalk from 14 to 23, I've been seeing an alarmingly large volume of Google Play crash reports related to org.xwalk.core.XWalkView.onTouchEvent on a broad array of Android versions and devices. I've looked around Google/StackOverflow with no success, and to be honest don't even know where to start in diagnosing the issue since I haven't been able to replicate it myself. A sample stack trace is below.
Any recommendations? Even tips on paths to move forward to figuring out what is going on would be great. I would rather not strip Crosswalk from my app since I do have a non-insignificant number of Android <5.0 users.
Thanks!
java.lang.RuntimeException: at
org.xwalk.core.XWalkView.onTouchEvent(XWalkView.java:1689) at
android.view.View.dispatchTouchEvent(View.java:10011) at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2669)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2344) at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2675)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301) at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2675)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301) at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2675)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301) at
com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:437)
at
com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1814)
at android.app.Activity.dispatchTouchEvent(Activity.java:3070) at
com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:386)
at android.view.View.dispatchPointerEvent(View.java:10251) at
android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4659)
at
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4517)
at
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4028)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4087)
at
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4053)
at
android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4202)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4061)
at
android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4259)
at
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4033)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4087)
at
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4053)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4061)
at
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4033)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6459)
at
android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6427)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6381)
at
android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6562)
at
android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:216)
at android.os.MessageQueue.nativePollOnce(Native Method:0) at
android.os.MessageQueue.next(MessageQueue.java:323) at
android.os.Looper.loop(Looper.java:145) at
android.app.ActivityThread.main(ActivityThread.java:6459) at
java.lang.reflect.Method.invoke(Native Method:0) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:938)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:828)
Okay i have this strange situation... I have a project in android studio that was working fine till last night but when i uninstalled the application and made clean and rerun attempt to install the app it takes forever to install the app
Now the situation is i have other projects in android studio which i tried to run in the same device and they are installing fine. So i think the device is good.
I tried to run the same project on other device and it worked completely fine so i think the android studio as well as my code is fine.
i thought the uninstalling was the issue so i cleared cached data of device and it dint work. So anyone having idea how to resolve this issue?
I have tried everything like clean and rerun, invalidate cache and restart etc so suggest something else. Tell me if you want something from the code.
Edit :
Now I changed the package name of the project so that if the previous app gave some problem during uninstalling then it should treat this app as new application because i changed the package name but still it isn't working.
Try to remove it from other users as well if any exists in your device.
I found the solution. Actually i found the error due to which the android studio was taking forever to install the apk... it was not able to allocate memory during run time. This was the error i was getting.
java.lang.OutOfMemoryError: Failed to allocate a 191692812 byte allocation with 12539072 free bytes and 110MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:613)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:446)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:973)
at android.content.res.Resources.createFromResourceStream(Resources.java:2771)
at android.content.res.Resources.loadDrawableForCookie(Resources.java:2472)
at android.content.res.Resources.loadDrawable(Resources.java:2370)
at com.miui.internal.variable.v21.Android_Content_Res_Resources_class.handleLoadDrawable(SourceFile:40)
at android.content.res.MiuiResources.loadDrawable(MiuiResources.java:393)
at android.content.res.Resources.getDrawable(Resources.java:776)
at android.content.res.Resources.getDrawable(Resources.java:742)
at android.app.ApplicationPackageManager.getDrawable(ApplicationPackageManager.java:743)
at android.app.MiuiThemeHelper.getDrawable(MiuiThemeHelper.java:103)
at android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:157)
at android.app.ApplicationPackageManager.getApplicationIcon(ApplicationPackageManager.java:800)
at com.miui.permcenter.install.AdbInstallActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5982)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
at android.app.ActivityThread.access$800(ActivityThread.java:147)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5237)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)
I'm working on Android chat app and everything was going fine. I've managed to add users to the parse database and display users on a friends fragment.
But then came Sinch. I added the SDK to my project as instructed on their website and added a service class which I've declared in the manifest like:
<service android:name=".services.MessageService" />
inside the application tag.
However I am experiencing a fatal error. The app runs fine until I run the service.
I run the service the moment the user logs in or registers successfully, also when already logged in. I think I have an idea of what's happening.
Something to do with:
java.lang.UnsatisfiedLinkError:
dalvik.system.PathClassLoader[DexPathList[[zip file
"/data/app/com.landagmail.josemaria.chatapp-1/base.apk"],nativeLibraryDirectories=[/vendor/lib,
/system/lib]]]
When creating the sinch client.
I think it has something to do with Android not finding some kind of library? A sinch one? (UnsatisfiedLinkError)
Any help would be greatly appreciated =) Regards, Jose Maria Landa
Here's the output:
06-14 20:30:26.052 21498-21498/com.landagmail.josemaria.chatapp
E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.landagmail.josemaria.chatapp, PID: 21498
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file
"/data/app/com.landagmail.josemaria.chatapp-1/base.apk"],nativeLibraryDirectories=[/vendor/lib,
/system/lib]]] couldn't find "libsinch-android-rtc.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:989)
at com.sinch.android.rtc.internal.client.DefaultSinchClient.(DefaultSinchClient.java:72)
at com.sinch.android.rtc.internal.client.InternalSinchClientFactory.createSinchClient(InternalSinchClientFactory.java:17)
at com.sinch.android.rtc.DefaultSinchClientBuilder.build(DefaultSinchClientBuilder.java:95)
at com.landagmail.josemaria.chatapp.services.MessageService.startSinchClient(MessageService.java:45)
at com.landagmail.josemaria.chatapp.services.MessageService.onStartCommand(MessageService.java:34)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2893)
at android.app.ActivityThread.access$2200(ActivityThread.java:147)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1394)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
forgot it. i solved it. the jniLbis folder was in the wrong directory. should have been in src directory not alongside libs