I'm at a loss on this... I have an app that was previously compiling and working, that now cannot find its own custom Application class. I looked in the APK at each dex file and don't see it anywhere. I rarely update the app code anymore, so it's not like a recent code / gradle change should have caused this. Below is the stacktrace from logcat:
07-13 23:35:47.273 19148 19148 E AndroidRuntime: FATAL EXCEPTION: main
07-13 23:35:47.273 19148 19148 E AndroidRuntime: Process: <app_package_name>, PID: 19148
07-13 23:35:47.273 19148 19148 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate application <app_package_name>.<MyCustomApplicationClass>: java.lang.ClassNotFoundException: Didn't find class "<app_package_name>.<MyCustomApplicationClass>" on path: DexPathList[[zip file "/data/app/<app_package_name>-...==/base.apk"],nativeLibraryDirectories=[/data/app/<app_package_name>-...==/lib/x86, /system/lib, /system/vendor/lib]]
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:948)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5759)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at android.app.ActivityThread.-wrap1(Unknown Source:0)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1659)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6535)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "<app_package_name>.<MyCustomApplicationClass>" on path: DexPathList[[zip file "/data/app/<app_package_name>-...==/base.apk"],nativeLibraryDirectories=[/data/app/<app_package_name>-...==/lib/x86, /system/lib, /system/vendor/lib]]
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at android.app.Instrumentation.newApplication(Instrumentation.java:1086)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:942)
07-13 23:35:47.273 19148 19148 E AndroidRuntime: ... 9 more
07-13 23:35:47.297 1630 2640 W ActivityManager: Force finishing activity <app_package_name>/<core_module_package>.HomeActivity
07-13 23:35:47.481 1630 1715 W AppOps : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
07-13 23:35:47.794 1630 1657 W Looper : Dispatch took 373ms on android.ui, h=Handler (android.view.Choreographer$FrameHandler) {3a74f28} cb=android.view.Choreographer$FrameDisplayEventReceiver#94b1441 msg=0
07-13 23:35:47.803 1630 1656 W ActivityManager: Activity pause timeout for ActivityRecord{6da3ef1 u0 <app_package_name>/<core_module_package>.HomeActivity t18 f}
07-13 23:35:48.134 1630 1657 W Looper : Dispatch took 181ms on android.ui, h=Handler (com.android.server.am.ActivityManagerService$UiHandler) {43c2d01} cb=null msg=30
07-13 23:35:48.414 2544 19186 E ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
07-13 23:35:48.446 1630 1715 W WindowManager: Failed looking up window
07-13 23:35:48.446 1630 1715 W WindowManager: java.lang.IllegalArgumentException: Requested window android.view.ViewRootImpl$W#1173f3f does not exist
07-13 23:35:48.446 1630 1715 W WindowManager: at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:5609)
07-13 23:35:48.446 1630 1715 W WindowManager: at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:5602)
07-13 23:35:48.446 1630 1715 W WindowManager: at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:1644)
07-13 23:35:48.446 1630 1715 W WindowManager: at com.android.server.wm.Session.remove(Session.java:209)
07-13 23:35:48.446 1630 1715 W WindowManager: at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:3488)
07-13 23:35:48.446 1630 1715 W WindowManager: at android.view.ViewRootImpl.doDie(ViewRootImpl.java:6306)
07-13 23:35:48.446 1630 1715 W WindowManager: at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3882)
07-13 23:35:48.446 1630 1715 W WindowManager: at android.os.Handler.dispatchMessage(Handler.java:105)
07-13 23:35:48.446 1630 1715 W WindowManager: at android.os.Looper.loop(Looper.java:164)
07-13 23:35:48.446 1630 1715 W WindowManager: at android.os.HandlerThread.run(HandlerThread.java:65)
07-13 23:35:48.446 1630 1715 W WindowManager: at com.android.server.ServiceThread.run(ServiceThread.java:46)
07-13 23:35:48.718 1630 1777 E TaskPersister: File error accessing recents directory (directory doesn't exist?).
07-13 23:35:53.485 2544 19186 E ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
07-13 23:35:58.452 1630 1656 W ActivityManager: Activity destroy timeout for ActivityRecord{6da3ef1 u0 <app_package_name>/<core_module_package>.HomeActivity t18 f}
The app is arranged as a few gradle modules. There's one core module with most of the app code. Then there's free and pro modules that customize what features the user sees. Each has its own custom Application class that extends a custom Application class in the core module. After the crash, I pulled up the APK analyzer in Android Studio (latest 3.5 beta at the moment) and saw no signs of the custom Application class in any of the dex files.
I've tried adding a couple of Proguard lines to -keep everything in the package. I've also tried -dontobfuscate.
Yes, the custom Application classes are listed in the AndroidManifest.xml of each module, are correctly spelled, etc. I've tried both absolute and relative paths to the class with the same result. I tried disabling R8 and that didn't help either.
The app is set for API levels 23 to 28, uses AndroidX, etc.
Any ideas what I'm missing here?
EDIT:
Here's the relevant bits of Manifest:
This is the relevant piece the "pro" module's AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="<package>">
<application android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:name=".<CustomName>Application"
tools:replace="android:name">
And this is the relevant piece the core module's AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="<base_package>">
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:name="<base_package>.<CustomBase>Application"
android:usesCleartextTraffic="true"
android:targetSandboxVersion="1">
The custom Application class in the core module extends MultiDexApplication.
Related
I'm using ArrowOs on my Moto G5s+ (sanders) to run the Munich's local transport's app "MVG Fahrinfo" [1], which allows to buy tickets for the local bus&subway services.
I was able to buy those tickets until at least May 25th, 2022.
I remember, there has been an update to the app, but since I needed no ticket, I noticed by end-June, that I could no longer buy tickets. The app just crashes.
Turning on the logging, I'm getting the following error in the log:
07-13 07:33:35.097 8070 8092 D TransportRuntime.JobInfoScheduler: Scheduling upload for context TransportContext(cct, HIGHEST, MSRodHRwczovL2NyYXNobHl0aWNzcmVwb3J0cy1wYS5nb29nbGVhcGlzLmNvbS92MS9maXJlbG9nL2xlZ2FjeS9iYXRjaGxvZ1xBSXphU3lCcnBTWVQ0RkZMMDlyZUhKaTZIOUZZZGVpU25VVE92Mk0=) with jobId=1899902110 in 1000ms(Backend next call timestamp 1657115477558). Attempt 1
--------- beginning of crash
07-13 07:33:35.113 8070 8070 E AndroidRuntime: FATAL EXCEPTION: main
07-13 07:33:35.113 8070 8070 E AndroidRuntime: Process: de.swm.mvgfahrinfo.muenchen, PID: 8070
07-13 07:33:35.113 8070 8070 E AndroidRuntime: java.security.ProviderException: Failed to generate attestation certificate chain
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.getAttestationChain(AndroidKeyStoreKeyPairGeneratorSpi.java:611)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.createCertificateChain(AndroidKeyStoreKeyPairGeneratorSpi.java:498)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.generateKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:475)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:727)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at b.b(Unknown Source:28)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at c$a.invokeSuspend(SourceFile:6)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:4)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(SourceFile:22)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7665)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: Caused by: android.security.KeyStoreException: Not implemented
07-13 07:33:35.113 8070 8070 E AndroidRuntime: at android.security.KeyStore.getKeyStoreException(KeyStore.java:1306)
07-13 07:33:35.113 8070 8070 E AndroidRuntime: ... 15 more
07-13 07:33:35.116 2534 9249 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
07-13 07:33:35.117 2534 6885 W ActivityTaskManager: Force finishing activity de.swm.mvgfahrinfo.muenchen/.mobilityticketing.MobilityTicketingActivity
07-13 07:33:35.120 2534 9249 W DropBoxManagerService: Dropping: data_app_crash (1578 > 0 bytes)
I have another sanders phone, which has the same problem.
Today, I've reverted one of those phones to stock Oreo, and there I could buy a ticket successfully. But updating the phone again to an ArrowOs version (Official of January 2022[2]), which allowed to buy a ticket in January (I still have the receipt...), leads to the problem again.
So my guess is: the app got changed, such that it now requests something, that leads to the error. Using it on an older version does not show this error, so it must handle that request differently.
From what I found on XDA and elsewhere was the info, that a key is being requested, that seems to be missing.
Is that correct? Does anybody know, how I can resolve this issue?
https://play.google.com/store/apps/details?id=de.swm.mvgfahrinfo.muenchen
2: https://get.mirror1.arrowos.net/download.php?token=SEquC3jlPUK5dhHYBZwfW7b1io8eJOyVnzkG0tINmxrsLDg6QFa9c2AT4vXR&version=arrow-11.0&variant=official&device=sanders
Thanks a lot for your help.
kniffte
I built AOSP (android-8.1.0_r52) then flash to nexus 5x
BUT it doesn't support app with armeabi-v7a native library only.
E:\Project\JniApp\app\build\outputs\apk\debug>adb shell getprop ro.product.cpu.abi
arm64-v8a
E:\Project\JniApp\app\build\outputs\apk\debug>adb shell getprop ro.product.cpu.abilist
arm64-v8a,armeabi-v7a,armeabi
here is the error PathClassLoader doesn't find armeabi-v7a librarys
03-04 22:07:32.291 4600 4600 D AndroidRuntime: Shutting down VM
03-04 22:07:32.295 4600 4600 E AndroidRuntime: FATAL EXCEPTION: main
03-04 22:07:32.295 4600 4600 E AndroidRuntime: Process: com.example.jniapp, PID: 4600
03-04 22:07:32.295 4600 4600 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.jniapp-im9SAuaTFDrdrTwHyX9rKg==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.jniapp-im9SAuaTFDrdrTwHyX9rKg==/lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libnative-lib.so"
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1657)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at com.example.jniapp.MainActivity.<clinit>(MainActivity.java:14)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1174)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1597)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6506)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
03-04 22:07:32.295 4600 4600 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-04 22:07:32.300 839 1853 W ActivityManager: Force finishing activity com.example.jniapp/.MainActivity
03-04 22:07:32.306 839 924 I ActivityManager: Showing crash dialog for package com.example.jniapp u0
03-04 22:07:32.327 839 2093 I OpenGLRenderer: Initialized EGL, version 1.4
03-04 22:07:32.327 839 2093 D OpenGLRenderer: Swap behavior 2
03-04 22:07:32.544 580 793 D audio_hw_primary: disable_audio_route: usecase(1) reset and update mixer path: low-latency-playback
03-04 22:07:32.559 580 793 D audio_hw_primary: disable_snd_device: snd_device(95: vi-feedback)
03-04 22:07:32.560 580 793 D audio_hw_primary: disable_audio_route: usecase(24) reset and update mixer path: spkr-vi-record
03-04 22:07:32.802 839 923 W ActivityManager: Activity pause timeout for ActivityRecord{6d9fbd u0 com.example.jniapp/.MainActivity t9 f}
Setup wizard is getting crashed after the "set up as a new " screen when we connect to wifi it says:
checking for updates
and then Setup wizard crashes.
Android version: 7.1.2 GMS vesrion integrated in device:[7.1_r5]
We already have the framework changes added in our code but still we are getting the error
https://android.googlesource.com/platform/frameworks/base/+/b3ad567%5E%21/#F1
Logs:
09-19 17:39:19.360 9982 9982 E AndroidRuntime: FATAL EXCEPTION: main
09-19 17:39:19.360 9982 9982 E AndroidRuntime: Process: com.google.android.setupwizard, PID: 9982
09-19 17:39:19.360 9982 9982 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.google.android.setupwizard/com.google.android.setupwizard.account.AccountSetupWrapper}: **java.lang.SecurityException: Permission Denial: updateLockTaskPackages() from pid=9982, uid=10028 requires android.permission.UPDATE_LOCK_TASK_PACKAGES**
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2666)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6121)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: Caused by: java.lang.SecurityException: Permission Denial: updateLockTaskPackages() from pid=9982, uid=10028 requires android.permission.UPDATE_LOCK_TASK_PACKAGES
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1684)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1637)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at android.app.ActivityManagerProxy.updateLockTaskPackages(ActivityManagerNative.java:6774)
09-19 17:39:19.360 9982 9982 E AndroidRuntime: at
I am not sure exactly the reason why this happens, maybe your OpenGMS is not properly installed...
The setupwizard is install under "/system/priv-app", so you might change the permission level of android.permission.UPDATE_LOCK_TASK_PACKAGES in frameworks/base/core/res/AndroidManifest.xml as followings
android:protectionLevel="signature|setup|privileged"
This works in my case....
Able to fix the issue.
There seems to be a two setupwizard which are causing the issue
Add below piece of code in Android.mk for Setupwizard delivered as GMS application
LOCAL_OVERRIDES_PACKAGES := Provision Setup_Wizard
I'm trying to run an espresso black box test on a 3rd party apk file using a test apk file. I've set the testApplicationId in the build.gradle, and the targetPackage in AndroidManifest.xml.
Here's the commands I run:
adb install app-debug.apk
Success
adb install app-debug-androidTest.apk
Success
adb shell am instrument -w com.example.android.testing.espresso.WikipediaTester/android.support.test.runner.AndroidJUnitRunner
INSTRUMENTATION_RESULT: shortMsg=Process crashed.
INSTRUMENTATION_CODE: 0
Here's the tomcat log:
09-11 22:22:17.065 8576 8576 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
09-11 22:22:17.098 8576 8576 W app_process: Unexpected CPU variant for X86 using defaults: x86
09-11 22:22:17.116 8576 8576 D AndroidRuntime: Calling main entry com.android.commands.am.Am
09-11 22:22:17.118 1510 2317 I ActivityManager: Force stopping org.wikipedia.alpha appid=10102 user=0: start instr
09-11 22:22:17.123 8586 8586 I zygote : Not late-enabling -Xcheck:jni (already on)
09-11 22:22:17.130 1510 2317 I ActivityManager: Start proc 8586:org.wikipedia.alpha/u0a102 for added application org.wikipedia.alpha
09-11 22:22:17.131 8586 8586 W zygote : Unexpected CPU variant for X86 using defaults: x86
09-11 22:22:17.149 8586 8586 W zygote : Found duplicate classes, falling back to extracting from APK : /data/app/org.wikipedia.alpha-X9wevNAQOGt3rTh-c4Ydpg==/base.apk
09-11 22:22:17.149 8586 8586 W zygote : NOTE: This wastes RAM and hurts startup performance.
09-11 22:22:17.149 8586 8586 W zygote : Found duplicated class when checking oat files: 'Landroid/support/annotation/AnimRes;' in /data/app/org.wikipedia.alpha-X9wevNAQOGt3rTh-c4Ydpg==/base.apk and /data/app/com.example.android.testing.espresso.WikipediaTester-iiYiial_oKwqZvmMrjx_Zw==/base.apk
09-11 22:22:17.149 8586 8586 W zygote :
09-11 22:22:17.279 8586 8586 W System : ClassLoader referenced unknown path:
09-11 22:22:17.281 8586 8586 D AndroidRuntime: Shutting down VM
09-11 22:22:17.282 8586 8586 E AndroidRuntime: FATAL EXCEPTION: main
09-11 22:22:17.282 8586 8586 E AndroidRuntime: Process: org.wikipedia.alpha, PID: 8586
09-11 22:22:17.282 8586 8586 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo{com.example.android.testing.espresso.WikipediaTester/android.support.test.runner.AndroidJUnitRunner}: java.lang.ClassNotFoundException: Didn't find class "android.support.test.runner.AndroidJUnitRunner" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /system/vendor/lib]]
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5730)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at android.app.ActivityThread.-wrap1(Unknown Source:0)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6541)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.test.runner.AndroidJUnitRunner" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /system/vendor/lib]]
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5728)
09-11 22:22:17.282 8586 8586 E AndroidRuntime: ... 8 more
09-11 22:22:17.284 8586 8586 I Process : Sending signal. PID: 8586 SIG: 9
09-11 22:22:17.328 1510 1522 I ActivityManager: Process org.wikipedia.alpha (pid 8586) has died: fore FGS
09-11 22:22:17.329 1510 1522 W ActivityManager: Crash of app org.wikipedia.alpha running instrumentation ComponentInfo{com.example.android.testing.espresso.WikipediaTester/android.support.test.runner.AndroidJUnitRunner}
09-11 22:22:17.329 1510 1522 I ActivityManager: Force stopping org.wikipedia.alpha appid=10102 user=0: finished inst
09-11 22:22:17.330 1510 8604 W Binder : Outgoing transactions from this process must be FLAG_ONEWAY
09-11 22:22:17.330 1510 8604 W Binder : java.lang.Throwable
09-11 22:22:17.330 1510 8604 W Binder : at android.os.BinderProxy.transact(Binder.java:736)
09-11 22:22:17.330 1510 8604 W Binder : at android.app.IInstrumentationWatcher$Stub$Proxy.instrumentationFinished(IInstrumentationWatcher.java:160)
09-11 22:22:17.330 1510 8604 W Binder : at com.android.server.am.InstrumentationReporter$MyThread.run(InstrumentationReporter.java:86)
09-11 22:22:17.331 8576 8576 D AndroidRuntime: Shutting down VM
Figured it out, moved from androidTest to main
My NDK game works well in Debug mode, but crashes in release with the following log on Nexus 7:
E dalvikvm: dlopen("/data/app-lib/com.js.pathoflight-1/libPathOfLight.so") failed: dlopen failed: cannot locate symbol "__gnu_thumb1_case_uqi" referenced by
"libPathOfLight.so"...
W dalvikvm: Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/js /pathoflight/JSNativeActivity;
W dalvikvm: Class init failed in newInstance call (Lcom/js/pathoflight/JSNativeActivity;)
D AndroidRuntime: Shutting down VM
W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41b01700)
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__gnu_thumb1_case_uqi" referenced by "libPathOfLight.so"...
E AndroidRuntime: at java.lang.Runtime.loadLibrary(Runtime.java:361)
E AndroidRuntime: at java.lang.System.loadLibrary(System.java:525)
E AndroidRuntime: at com.js.pathoflight.JSNativeActivity.<clinit>(JSNativeActivity.java:59)
E AndroidRuntime: at java.lang.Class.newInstanceImpl(Native Method)
E AndroidRuntime: at java.lang.Class.newInstance(Class.java:1130)
E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
E AndroidRuntime: at android.app.ActivityThread.access$600(ActivityThread.java:141)
E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
E AndroidRuntime: at android.os.Looper.loop(Looper.java:137)
E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5103)
E AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:525)
E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
W ActivityManager: Force finishing activity com.js.pathoflight/.JSNativeActivity
I'll appreciate any suggestion.
While removing different parts of the code I found that the issue was in a 3rd party library I used.
I changed its usage from "gnustl_static" version (.a) to "gnustl_shared" (.so) one and the problem disappeared!