[AC-6170] ti.admob Android error: Failed resolution of: Lcom/google/android/gms/ads/AdSize
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2019-03-19T08:47:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator Modules |
Labels | n/a |
Reporter | Justin Tickner |
Assignee | Shak Hossain |
Created | 2019-03-14T00:54:55.000+0000 |
Updated | 2019-07-29T23:02:59.000+0000 |
Description
An issue with ti.admob appeared in the latest release of one of my apps, and based on the crash reports through Google Play, it seems to be isolated to Huawei phones running Android 8.0 or above. I was able to replicate this crash on a Huawei phone of my own, but ti.admob seems to run fine on other Android brands (Samsung, HTC, Google).
I was able to replicate this crash by running the example app.js included in the ti.admob repo.
Output:
[ERROR] TiExceptionHandler: (main) [1262,1708] Failed resolution of: Lcom/google/android/gms/ads/AdSize;
[ERROR] TiExceptionHandler:
[ERROR] TiExceptionHandler: dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
[ERROR] TiExceptionHandler: java.lang.ClassLoader.loadClass(ClassLoader.java:379)
[ERROR] TiExceptionHandler: java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[ERROR] TiExceptionHandler: ti.admob.View.(View.java:34)
[ERROR] TiExceptionHandler: ti.admob.ViewProxy.createView(ViewProxy.java:52)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:587)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:556)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:609)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:593)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:556)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:609)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:593)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:556)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:798)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:275)
[ERROR] TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:105)
[ERROR] TiExceptionHandler: android.os.Looper.loop(Looper.java:207)
[ERROR] TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:7470)
[ERROR] TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)
[ERROR] TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
[ERROR] TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
Hello, Thanks for reporting this. Can you please test this on SDK 7.5.1.GA and let us know the results.
Hello [~jtickner], So this is device model specific issue? I wasn't able to reproduce it on Nokia 6 (9.0.0). Try with the SDK 7.5.1.GA. let us know. Thanks.
Tested on SDK 7.5.1.GA and it is still occurring. Also, yes, it seems to be device model specific to Huawei. I've tested on both Samsung and HTC devices and it is working fine on those (like you're seeing with a Nokia).
[~jtickner], Can you please confirm you experience the same issue using this version of ti sdk: 8.1.0v20190214095127 You can install the sdk using this command: appc ti sdk install 8.1.0v20190214095127 Let us know the update. Thanks.
Tested on SDK 8.1.0.v20190214095127 and the same issue still occurs. However, I think I may have misidentified the problem. I dropped my version of ti.playservices from 16.1.2 down to 11.0.40 and the issue disappears - ads are working again on all Android devices through ti.admob. Could it be a compatibility issue between the ti.admob module and ti.playsevices 16.1.2?
Had the same error on a Pixel running Ti SDK 8.0.2.GA. Instead of going to a lower version of playservices, I went from 16.1.3 to 16.1.4 and then admob 4.4.0 works.