Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6170] ti.admob Android error: Failed resolution of: Lcom/google/android/gms/ads/AdSize

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2019-03-19T08:47:32.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules
Labelsn/a
ReporterJustin Tickner
AssigneeShak Hossain
Created2019-03-14T00:54:55.000+0000
Updated2019-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)

Comments

  1. Rakhi Mitro 2019-03-14

    Hello, Thanks for reporting this. Can you please test this on SDK 7.5.1.GA and let us know the results.
  2. Sharif AbuDarda 2019-03-14

    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.
  3. Justin Tickner 2019-03-14

    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).
  4. Jebun Naher 2019-03-18

    [~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.
  5. Justin Tickner 2019-03-18

    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?
  6. Adam Paxton 2019-07-29

    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.

JSON Source