I have an app that was written a couple years back that I am in the process of maintaining. The app uses HoloEverywhere and ActionBarSherlock to provide certain functionality back to older versions of the OS. Until recently there have never been any problems with this, so it was quite a shock to see support complaints about the app crashing on startup this week. These crashes are all on Android 6.0 devices and all come with the following exception message.
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.laridian.pocketbible/com.laridian.pocketbible.PocketBibleMainActivity}: java.lang.RuntimeException: java.lang.IllegalAccessException: java.lang.Class<org.holoeverywhere.addon.AddonSherlock$HoloActionBarSherlockNative> is not accessible from java.lang.Class<com.actionbarsherlock.ActionBarSherlock>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: java.lang.Class<org.holoeverywhere.addon.AddonSherlock$HoloActionBarSherlockNative> is not accessible from java.lang.Class<com.actionbarsherlock.ActionBarSherlock>
at com.actionbarsherlock.ActionBarSherlock.wrap(ActionBarSherlock.java:238)
at org.holoeverywhere.addon.AddonSherlock$AddonSherlockA.getSherlock(AddonSherlock.java:54)
at org.holoeverywhere.addon.AddonSherlock$AddonSherlockA.requestWindowFeature(AddonSherlock.java:159)
at org.holoeverywhere.app.Activity$24.action(Activity.java:515)
at org.holoeverywhere.app.Activity$24.action(Activity.java:1)
at org.holoeverywhere.addon.IAddonBasicAttacher.performAddonAction(IAddonBasicAttacher.java:122)
at org.holoeverywhere.app.Activity.performAddonAction(Activity.java:505)
at org.holoeverywhere.app.Activity.requestWindowFeature(Activity.java:512)
at android.support.v4.app._HoloActivity.onInit(_HoloActivity.java:491)
at android.support.v4.app._HoloActivity.forceInit(_HoloActivity.java:227)
at org.holoeverywhere.app.Activity.onCreate(Activity.java:225)
at com.laridian.pocketbible.PocketBibleActivity.onCreate(PocketBibleActivity.java:126)
at com.laridian.pocketbible.PocketBibleMainActivity.onCreate(PocketBibleMainActivity.java:1180)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
... 9 more
Caused by: java.lang.IllegalAccessException: java.lang.Class<org.holoeverywhere.addon.AddonSherlock$HoloActionBarSherlockNative> is not accessible from java.lang.Class<com.actionbarsherlock.ActionBarSherlock>
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.actionbarsherlock.ActionBarSherlock.wrap(ActionBarSherlock.java:230)
... 24 more
So I know something has changed with regard to these libraries. However, I'm not sure what I can do about this. Is there a new version of ActionBarSherlock that is compatible with Android 6.0? Is there a version of HoloEverywhere that will work for Android 6.0? Is there something I'm missing here? Or am I going to have to go back and rewrite my whole app to support Android 6.0?
You are working with an old version of a deprecated library. HoloEverywhere stopped to use ABS like 2 years ago. ABS was deprecated long time ago too. No one support to those libraries right now.
My tip: remove your HoloEverywhere dependencie. Then embrace Material and/or move your minSdk to 15.
If you can't do that: update to the last version of HoloEverywhere. This is the faster fix, but you are working with a deprecated library...
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.
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.
I build Pjsip library and use its sample in android studio .
question
When I run that i got this error.How could I solve it ? thanks in advance.
exception
jsip.pjsua2.app E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.pjsip.pjsua2.app, PID: 4360
java.lang.UnsatisfiedLinkError: No implementation found for void org.pjsip.pjsua2.pjsua2JNI.swig_module_init() (tried Java_org_pjsip_pjsua2_pjsua2JNI_swig_1module_1init and Java_org_pjsip_pjsua2_pjsua2JNI_swig_1module_1init__)
at org.pjsip.pjsua2.pjsua2JNI.swig_module_init(Native Method)
at org.pjsip.pjsua2.pjsua2JNI.(pjsua2JNI.java:2351)
at org.pjsip.pjsua2.Endpoint.(Endpoint.java:68)
at org.pjsip.pjsua2.app.MyApp.(MyApp.java:296)
at org.pjsip.pjsua2.app.MainActivity.onCreate(MainActivity.java:92)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)
at android.app.ActivityThread.access$800(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5389)
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:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
It may happen for several reasons. First, check if you attached the native library correctly. For that create a folder named "jniLibs" into the projects
app/src/main/jniLibs
then put your armeabi architecture library like
armeabi/libpjsua2.so
for other architecture like armeabi-v7a use
armeabi-v7a/libpjsua2.so
like this.
there are other reasons may happen. If you build pjsip library for armeabi architecture only and running your application in an x86 architecture device then this error may occur. So check it also if you have built it for that application.
Please take a look at this thread: building pjsua2 dll
the important thing to know here is that the error you show in your question is caused by the fact that the pjsua2.dll (a c++ dll) is not in your output directory.
I'm trying to run an android xamarin app in Visual Studio 2013, it deploys normally, but crashes after start.
Here is the log:
java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_22 or Xamarin.Android.Pla
at android.app.ActivityThread.installProvider(ActivityThread.java:5002)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4594)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4534)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
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:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_22 or Xamarin.Android.Platform!
at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:38)
at android.app.ActivityThread.installProvider(ActivityThread.java:4999)
... 11 more
Caused by: android.content.pm.PackageManager$NameNotFoundException: Xamarin.Android.Platform
at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:281)
at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:32)
The same thing on emulator with any platform and device.
Thank you in advance.
With the last Xamarin Update i run into this problem as well.
Try disabling "Use shared runtime" in your Android Build options. It seems with the current Version a developent build is not able to call into the shared mono runtime.
--> https://forums.xamarin.com/discussion/52439/unable-to-get-provider-mono-monoruntimeprovider
What helped some others:
Some suggested to just change "Target Version" (and "Compile Version" for VS) and Rebuild. The important part was to have changes in the Project File and not what exactly you changed "Target Version" from and to.
--> https://stackoverflow.com/a/32607524/383658
I am using crosswalk with my cordova app.
I am experiencing the following error:
java.lang.ExceptionInInitializerError at
org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:340)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:376)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:368)
at de.gambify.android.CordovaApp.onCreate(CordovaApp.java:31) at
android.app.Activity.performCreate(Activity.java:6374) at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2767)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2879)
at android.app.ActivityThread.access$900(ActivityThread.java:182) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475)
at android.os.Handler.dispatchMessage(Handler.java:102) at
android.os.Looper.loop(Looper.java:145) at
android.app.ActivityThread.main(ActivityThread.java:6141) 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)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Use
SharedXWalkView if you want to support shared mode at
org.xwalk.core.ReflectionHelper.handleException(ReflectionHelper.java:233)
at
org.xwalk.core.ReflectionHelper.handleException(ReflectionHelper.java:237)
at org.xwalk.core.ReflectionHelper.init(ReflectionHelper.java:132) at
org.xwalk.core.ReflectionHelper.loadClass(ReflectionHelper.java:199)
at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:112)
at org.apache.cordova.CordovaWebView.(CordovaWebView.java:897)
... 17 more Caused by: java.lang.RuntimeException: Use SharedXWalkView
if you want to support shared mode ... 22 more
I thought at first it is related to the fact that I build my App only with ARM support. Now I have bundled my App with x86 as well as with ARM support, but still facing these errors.
What surprises me is the fact that it says I should use shared mode. I am currently using embedded mode.
The device I am seeing these issues is with a Samsung Galaxy S6 and Samsung Galaxy S6 edge.
I am using crosswalk 12.41.296.9
You need add permissions in the AndroidManifest.xml, you can locate this file in this path platforms/android/CordovaLib/AndroidManifest.xml
Add this:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
For me works deploying android-armv7-debug.apk