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
Related
I recently checked for my GP crash logs and I am getting this callstack very frequently. Could you please help me.
A few things:
The failed to add asset path sometimes shows /data/app/com.xxx.xxx.xxx-x/base.apk and sometimes /mnt/asec/com.xxx.xxx.xxx-x/base.apk.
The device android versions (where it is reported) varies from Android 4.4. to Android 7.0
In the GP console, Android version shows Android 7.0 for all crashes but the device list has devices with Android version 6.0, 5.0, etc which is unclear.
I have two apps with shared user Id, say with package names P1, P2. For P1, the failed to add asset path sometimes shows /data/app/P2 and sometimes /mnt/asec/P1. Isn't this incorrect and what could cause this?
Call stacks:
java.lang.RuntimeException: Unable to create BackupAgent android.app.backup.FullBackupAgent: android.content.res.Resources$NotFoundException: failed to add asset path data/app/com.P2.xxx/base.apk
at android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:3452)
at android.app.ActivityThread.-wrap5(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1796)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6688)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Caused by: android.content.res.Resources$NotFoundException: failed to add asset path /data/app/com.P2.xxx/base.apk
at android.app.ResourcesManager.createAssetManager(ResourcesManager.java:281)
at android.app.ResourcesManager.createResourcesImpl(ResourcesManager.java:359)
at android.app.ResourcesManager.getOrCreateResources(ResourcesManager.java:638)
at android.app.ResourcesManager.getResources(ResourcesManager.java:730)
at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:2068)
at android.app.LoadedApk.getResources(LoadedApk.java:780)
at android.app.ContextImpl.<init>(ContextImpl.java:2244)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2184)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2175)
at android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:3422)
Another crash:
android.content.res.Resources$NotFoundException: failed to add asset path /mnt/asec/com.P1.xxx/base.apk
at android.app.ResourcesManager.createAssetManager(ResourcesManager.java:281)
at android.app.ResourcesManager.createResourcesImpl(ResourcesManager.java:359)
at android.app.ResourcesManager.getOrCreateResources(ResourcesManager.java:638)
at android.app.ResourcesManager.getResources(ResourcesManager.java:730)
at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:2052)
at android.app.LoadedApk.getResources(LoadedApk.java:787)
at android.app.ContextImpl.<init>(ContextImpl.java:2266)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2210)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2196)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5861)
at android.app.ActivityThread.-wrap3(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1710)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
Please check if the App has external drive permissions.
In my case this issue triggered when ADB installed the App to the device which is screen locked, the same test has passed when the device is awake, so even though permissions available to this App
I have this error for com.android.billingclient:billing. Problem is "there is no account in the device", for example a new device or reset to vendor settings.
So just add an account in global settings.
I am using Google Sign In in my application. I am using google play services version 9.0.2
compile 'com.google.android.gms:play-services-plus:9.0.2'
It was working fine for all devices, but now I am getting crash logs from Crashlytics and the crash is only happening on Xiaomi devices. Here are the crash logs.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.eterno/com.google.android.gms.auth.api.signin.internal.SignInHubActivity}: java.lang.IllegalStateException: Bad magic number for Bundle: 0xffff4f45
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2423)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5441)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
Caused by java.lang.IllegalStateException: Bad magic number for Bundle: 0xffff4f45
at android.os.Parcel.readException(Parcel.java:1628)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:2661)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1509)
at android.app.Activity.startActivityForResult(Activity.java:3978)
at android.app.Activity.startActivityForResult(Activity.java:3939)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:842)
at com.google.android.gms.auth.api.signin.internal.SignInHubActivity.zza(Unknown Source)
at com.google.android.gms.auth.api.signin.internal.SignInHubActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5441)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
I am not able to reproduce the crash with any of the test devices that we can locally with us. Did any one else also face this issue with Xiaomi devices? Also, will upgrading the google play services version help in mitigating the issue?
P.S. I am not attaching code snippets which I wrote for Google Sign In because it is working for all other devices. This seems to be a specific problem related to Xiaomi devices.
Checkout out the playService App Version in device
I was getting same problem in my code. I found that release app is not working on those Xiaomi devices installed debug build.
I tried same release app without changing a single line of code on a different Xiaomi android phone and found app is working fine.
I didn't tried but this might be possible that resetting Xiaomi devices solve this problem.
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...
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 updated an Android project to Android 5.0 and everything is fine when running directly from Eclipse in Genymotion Simulator. But when I create a signed APK and upload that, it crashes. The signed APK works on Android 4.0 Simulator, but not on 5.0.
The AppCompat Library is linked with the project in Android > Library.
In the AndroidManifest.xml I have declared:
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="21" />
My base activity extends android.support.v7.app.ActionBarActivity. And this is the error I see in logcat when running on 5.0:
FATAL EXCEPTION: main
Process: com.myapp.mypackage, PID: 1414
java.lang.AbstractMethodError: abstract method "android.support.v7.app.ActionBar ol.a()"
at ol.b(SourceFile:123)
at android.support.v7.app.ActionBarActivity.getSupportActionBar(SourceFile:73)
at com.myapp.mypackage.StartActivity.onCreate(SourceFile:91)
at android.app.Activity.performCreate(Activity.java:5933)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
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:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
What could cause this or what is the difference between running directly and installing, except the signing?
Thank you very much, your help is appreciated!
Delete Eclipse and install Android Studio. ADT plugin is no longer supported by Google.
You should always target latest Android version (current latest is 22)
You should use latest v7 appcompat library (current latest is 22.2.0)
You should extend your activity from AppCompatActivity
This is an issue with Samsung's custom android and zipalign. While using zipalign, remove the -z parameter. This apk should work.