adb shell am instrument process crashed - android

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

Related

How to compile aosp (android-8.1.0) with armeabi-v7a support?

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}

Expected URL scheme 'http' or 'https' but no colon was found

I developed an application that through some requests by AXIOS to certain apis it presents data, the app is very simple, I have checked all links and they all start with HTTP or HTTPS .. The application works perfectly if I generate the apk in DEBUG mode , but if I create an apk release the error comes ...
it is worth mentioning that this is a project ejected from the expo
this is the logcat log when i open the app release:
04-20 23:11:18.022 10873 10896 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
04-20 23:11:18.022 10873 10896 E AndroidRuntime: Process: com.radarcorona, PID: 10873
04-20 23:11:18.022 10873 10896 E AndroidRuntime: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no colon was found
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1333)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at okhttp3.HttpUrl.get(HttpUrl.java:916)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at okhttp3.Request$Builder.url(Request.java:165)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at expo.modules.updates.loader.FileDownloader.addHeadersToManifestUrl(FileDownloader.java:190)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at expo.modules.updates.loader.FileDownloader.downloadManifest(FileDownloader.java:79)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at expo.modules.updates.loader.RemoteLoader.start(RemoteLoader.java:56)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at expo.modules.updates.UpdatesController.lambda$start$0$UpdatesController(UpdatesController.java:307)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at expo.modules.updates.-$$Lambda$UpdatesController$cVwvsx9XXcX6YuWbf7IvrVkJAiA.run(Unknown Source:6)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)04-20 23:11:18.022 10873 10896 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
04-20 23:11:18.022 10873 10896 E AndroidRuntime: at java.lang.Thread.run(Thread.java:919)
04-20 23:11:18.024 10873 10894 W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
04-20 23:11:18.036 2039 2882 W ActivityTaskManager: Force finishing activity com.radarcorona/.MainActivity
react-native: 0.61.5
I believe I found the solution to this error.
Removing expo-updates. As #fabiocosta88 mentioned on GitHub issue, the issue raises from expo-updates. Since I wasn't actually using the module in my project, I followed the guide to remove the module in all files it was defined. Here is the guide.
If uninstallation is not an option I believe that defining the EXPO_UPDATE_URL and EXPO_SDK_VERSION in the AndroidManifest.xml might solve the issue. I believe this guide defines how to get the EXPO_UPDATE_URL.

ClassNotFoundException on custom Application class (not in APK/dex files?)

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.

Android NDK: dlopen failed: cannot locate symbol "__gnu_thumb1_case_uqi"

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!

Android: AdWhirl cannot find AdMobAdapter

Using AdMob by itself works perfectly. Using AdMob through AdWhirl causes the following problem:
23114 dalvikvm I Failed resolving Lcom/adwhirl/adapters/AdMobAdapter; interface 144 'Lcom/admob/android/ads/AdListener;'
23114 dalvikvm W Link of class 'Lcom/adwhirl/adapters/AdMobAdapter;' failed
23114 dalvikvm E Could not find class 'com.adwhirl.adapters.AdMobAdapter', referenced from method com.adwhirl.adapters.AdWhirlAdapter.getAdapter
23114 dalvikvm W VFY: unable to resolve new-instance 172 (Lcom/adwhirl/adapters/AdMobAdapter;) in Lcom/adwhirl/adapters/AdWhirlAdapter;
23114 dalvikvm D VFY: replacing opcode 0x22 at 0x0012
23114 dalvikvm D Making a copy of Lcom/adwhirl/adapters/AdWhirlAdapter;.getAdapter code (229 bytes)
23114 dalvikvm I Failed resolving Lcom/adwhirl/adapters/QuattroAdapter; interface 524 'Lcom/qwapi/adclient/android/view/AdEventsListener;'
23114 dalvikvm W Link of class 'Lcom/adwhirl/adapters/QuattroAdapter;' failed
23114 dalvikvm E Could not find class 'com.adwhirl.adapters.QuattroAdapter', referenced from method com.adwhirl.adapters.AdWhirlAdapter.getAdapter
23114 dalvikvm W VFY: unable to resolve new-instance 177 (Lcom/adwhirl/adapters/QuattroAdapter;) in Lcom/adwhirl/adapters/AdWhirlAdapter;
23114 dalvikvm D VFY: replacing opcode 0x22 at 0x002c
23114 AndroidRuntime D Shutting down VM
23114 dalvikvm W threadid=3: thread exiting with uncaught exception (group=0x4001b180)
23114 FlurryAgent D Ending session
23114 LocationManager D removeUpdates: listener = com.flurry.android.FlurryAgent#4496be70
23114 AndroidRuntime E Uncaught handler: thread main exiting due to uncaught exception
23114 AndroidRuntime E java.lang.NoClassDefFoundError: com.adwhirl.adapters.AdMobAdapter
23114 AndroidRuntime E at com.adwhirl.adapters.AdWhirlAdapter.getAdapter(AdWhirlAdapter.java:39)
23114 AndroidRuntime E at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:154)
23114 AndroidRuntime E at com.adwhirl.AdWhirlLayout.access$0(AdWhirlLayout.java:143)
23114 AndroidRuntime E at com.adwhirl.AdWhirlLayout$1.run(AdWhirlLayout.java:87)
23114 AndroidRuntime E at android.os.Handler.handleCallback(Handler.java:587)
23114 AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:92)
23114 AndroidRuntime E at android.os.Looper.loop(Looper.java:123)
23114 AndroidRuntime E at android.app.ActivityThread.main(ActivityThread.java:4363)
23114 AndroidRuntime E at java.lang.reflect.Method.invokeNative(Native Method)
23114 AndroidRuntime E at java.lang.reflect.Method.invoke(Method.java:521)
23114 AndroidRuntime E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
23114 AndroidRuntime E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
23114 AndroidRuntime E at dalvik.system.NativeStart.main(Native Method)
Any ideas?
If you use adwhirl you still have to include all the other ad sdks. Looks like it can't find
com/admob/android/ads/AdListener
Lcom/qwapi/adclient/android/view/AdEventsListener
Make sure you are still including the admob and quattro sdks.

Categories

Resources