Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2304] Ti.admob: Android issues starting from Ti SDK 5.1

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-10-06T04:02:55.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
ComponentsAdmob
Labelsti.admob
ReporterVittorio Sorbera
AssigneeGary Mathews
Created2016-02-10T15:18:49.000+0000
Updated2018-08-06T17:49:12.000+0000

Description

Since I updated to Ti SDK 5.1, Android ti.admob module no longer works. When I add the view to the window, win.add(adMobView); the app crashes with this logs:
[INFO] :   dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
[WARN] :   dalvikvm: VFY: unable to resolve virtual method 748: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
[INFO] :   dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
[WARN] :   dalvikvm: VFY: unable to resolve virtual method 770: Landroid/content/res/TypedArray;.getType (I)I
[INFO] :   dalvikvm: Failed resolving Lcom/google/android/gms/ads/internal/zzl; interface 4115 'Lcom/google/android/gms/internal/zznw$zza;'
[WARN] :   dalvikvm: Link of class 'Lcom/google/android/gms/ads/internal/zzl;' failed
[INFO] :   dalvikvm: Could not find method com.google.android.gms.ads.internal.zzl.zzq, referenced from method com.google.android.gms.ads.internal.client.zzac.zzt
[WARN] :   dalvikvm: VFY: unable to resolve static method 22175: Lcom/google/android/gms/ads/internal/zzl;.zzq (Landroid/content/Context;)Lcom/google/android/gms/ads/internal/zzl;
[WARN] :   dalvikvm: VFY: unable to resolve static field 12552 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[INFO] :   I/[RevMob]: Install registered on server
[WARN] :   dalvikvm: VFY: unable to resolve static field 12549 (common_google_play_services_notification_ticker) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 12528 (common_ic_googleplayservices) in Lcom/google/android/gms/R$drawable;
[INFO] :   dalvikvm: Could not find method android.app.AppOpsManager.checkPackage, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
[INFO] :   dalvikvm: Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh
[WARN] :   dalvikvm: VFY: unable to resolve static field 12549 (common_google_play_services_notification_ticker) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve virtual method 156: Landroid/app/AppOpsManager;.checkPackage (ILjava/lang/String;)V
[WARN] :   dalvikvm: VFY: unable to resolve virtual method 661: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
[INFO] :   dalvikvm: DexOpt: unable to optimize static field ref 0x30ef at 0x66 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.zza
[INFO] :   dalvikvm: DexOpt: unable to optimize static field ref 0x3110 at 0x68 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.zza
[ERROR] :  GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[WARN] :   GooglePlayServicesUtil: Google Play services out of date.  Requires 7571000 but found 7099070
[INFO] :   dalvikvm: Failed resolving Lcom/google/android/gms/ads/internal/zzl; interface 4115 'Lcom/google/android/gms/internal/zznw$zza;'
[WARN] :   dalvikvm: Link of class 'Lcom/google/android/gms/ads/internal/zzl;' failed
[INFO] :   dalvikvm: Could not find method com.google.android.gms.ads.internal.zzl.zzq, referenced from method com.google.android.gms.ads.internal.zzb.zza
[WARN] :   dalvikvm: VFY: unable to resolve static method 22175: Lcom/google/android/gms/ads/internal/zzl;.zzq (Landroid/content/Context;)Lcom/google/android/gms/ads/internal/zzl;
[WARN] :   dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/android/gms/internal/zzan;)
[INFO] :   dalvikvm: Failed resolving Lcom/google/android/gms/ads/internal/zzl; interface 4115 'Lcom/google/android/gms/internal/zznw$zza;'
[WARN] :   dalvikvm: Link of class 'Lcom/google/android/gms/ads/internal/zzl;' failed
[INFO] :   dalvikvm: Could not find method com.google.android.gms.ads.internal.zzl.zzq, referenced from method com.google.android.gms.ads.internal.zza.zza
[WARN] :   dalvikvm: VFY: unable to resolve static method 22175: Lcom/google/android/gms/ads/internal/zzl;.zzq (Landroid/content/Context;)Lcom/google/android/gms/ads/internal/zzl;
[INFO] :   dalvikvm: Failed resolving Lcom/google/android/gms/ads/internal/zzl; interface 4115 'Lcom/google/android/gms/internal/zznw$zza;'
[WARN] :   dalvikvm: Link of class 'Lcom/google/android/gms/ads/internal/zzl;' failed
[INFO] :   dalvikvm: Could not find method com.google.android.gms.ads.internal.zzl.zzq, referenced from method com.google.android.gms.ads.internal.zza.zza
[WARN] :   dalvikvm: VFY: unable to resolve static method 22175: Lcom/google/android/gms/ads/internal/zzl;.zzq (Landroid/content/Context;)Lcom/google/android/gms/ads/internal/zzl;
[WARN] :   dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/android/gms/internal/zzan;)
[WARN] :   dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/android/gms/internal/zzan;)
[ERROR] :  dalvikvm: Could not find class 'com.google.android.gms.internal.zzan', referenced from method com.google.android.gms.ads.internal.zzp.<init>
[WARN] :   dalvikvm: VFY: unable to resolve new-instance 3580 (Lcom/google/android/gms/internal/zzan;) in Lcom/google/android/gms/ads/internal/zzp;
[INFO] :   dalvikvm: Failed resolving Lcom/google/android/gms/ads/internal/zzg; interface 3578 'Lcom/google/android/gms/internal/zzaj;'
[WARN] :   dalvikvm: Link of class 'Lcom/google/android/gms/ads/internal/zzg;' failed
[WARN] :   dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/android/gms/internal/zzan;)
[INFO] :   dalvikvm: Could not find method com.google.android.gms.internal.zzan.zzc, referenced from method com.google.android.gms.internal.zzhl.zza
[WARN] :   dalvikvm: VFY: unable to resolve virtual method 26052: Lcom/google/android/gms/internal/zzan;.zzc (Landroid/net/Uri;)Z
[WARN] :   dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/android/gms/internal/zzan;)
[WARN] :   dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/android/gms/internal/zzan;)
[WARN] :   dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa4c13648)
[ERROR] :  TiApplication: (main) [312,3235] Sending event: exception on thread: main msg:java.lang.NoClassDefFoundError: com.google.android.gms.internal.zzan; Titanium 5.1.2,2015/12/16 19:00,ca822b2
[ERROR] :  TiApplication: java.lang.NoClassDefFoundError: com.google.android.gms.internal.zzan
[ERROR] :  TiApplication: 	at com.google.android.gms.ads.internal.zzp.<init>(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.ads.internal.zzp.<init>(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.ads.internal.zzb.<init>(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.ads.internal.zzc.<init>(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.ads.internal.zze.<init>(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.ads.internal.client.zze.zza(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.ads.internal.client.zzy.zzcO(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.ads.internal.client.zzy.zza(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.ads.AdView.loadAd(Unknown Source)
[ERROR] :  TiApplication: 	at ti.admob.View$2.run(View.java:81)
[ERROR] :  TiApplication: 	at android.app.Activity.runOnUiThread(Activity.java:4673)
[ERROR] :  TiApplication: 	at ti.admob.View.loadAd(View.java:69)
[ERROR] :  TiApplication: 	at ti.admob.View.createAdView(View.java:64)
[ERROR] :  TiApplication: 	at ti.admob.View.processProperties(View.java:135)
[ERROR] :  TiApplication: 	at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:505)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:474)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:512)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:474)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:512)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:474)
[ERROR] :  TiApplication: 	at com.tripvi.drawerlayout.Drawer.replaceCenterView(Drawer.java:381)
[ERROR] :  TiApplication: 	at com.tripvi.drawerlayout.Drawer.processProperties(Drawer.java:443)
[ERROR] :  TiApplication: 	at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:505)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:474)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:512)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:474)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:675)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:569)
[ERROR] :  TiApplication: 	at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:237)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:508)
[ERROR] :  TiApplication: 	at org.appcelerator.titani
[ERROR] :  TiApplication: 	at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] :  TiApplication: 	at android.app.Activity.performCreate(Activity.java:5133)
[ERROR] :  TiApplication: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
[ERROR] :  TiApplication: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
[ERROR] :  TiApplication: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
[ERROR] :  TiApplication: 	at android.app.ActivityThread.access$600(ActivityThread.java:141)
[ERROR] :  TiApplication: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
[ERROR] :  TiApplication: 	at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] :  TiApplication: 	at android.os.Looper.loop(Looper.java:137)
[ERROR] :  TiApplication: 	at android.app.ActivityThread.main(ActivityThread.java:5103)
[ERROR] :  TiApplication: 	at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] :  TiApplication: 	at java.lang.reflect.Method.invoke(Method.java:525)
[ERROR] :  TiApplication: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
[ERROR] :  TiApplication: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
[ERROR] :  TiApplication: 	at dalvi

Attachments

FileDateSize
Screen Shot 2016-02-11 at 12.30.19 PM.png2016-02-11T06:31:18.000+000065985

Comments

  1. Sharif AbuDarda 2016-02-11

    Hello, I have tried testing ti.admob version 2.1.5 in Android 4.4.2. I did not find the issue. The application run as expected in device. Although when run on the simulator Android 5.1.0, I got the alert Play store resources not found But the application runs as expected without crush. See the attachment in emulator run. Thanks.
  2. Vittorio Sorbera 2016-02-11

    Hi, thanks for your comment. The problem is with the last 2.1.6 ti.admob version https://github.com/appcelerator-modules/ti.admob/blob/master/android/dist/ti.admob-android-2.1.6.zip
  3. Richard Campbell 2016-08-19

    I've been able to reproduce the crash using 5.3.1.GA and 5.4.0.GA with version 2.1.6 of the module ONLY on Android 6.0. To help, I'm posting my test code below: It doesn't matter if the adUnitId is specified or not, it crashes both ways. Titanium.UI.setBackgroundColor('#000'); var win = null, Admob = require('ti.admob'), adMobView = null; win = Ti.UI.createWindow({ backgroundColor : '#000', title : 'AdMob Test', navBarHidden : false, fullscreen : false, exitOnClose : true }); adMobView = Admob.createView({ adType: Admob.AD_TYPE_BANNER, left : 0, right : 0, bottom: 0, height : 50, adBackgroundColor: '#000', isInterstitial : false, debugEnabled : true, testing: true }); win.add(adMobView); win.open();
  4. Gary Mathews 2016-09-30

    ti.admob: https://github.com/appcelerator-modules/ti.admob/pull/63
  5. Chee Kiat Ng 2016-10-06

    PR merged.
  6. Eric Merriman 2018-08-06

    Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.

JSON Source