-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
com.google.android.gms:play-services-ads:7.8.0 AudioManager NullPointerException #1992
Comments
Encountered the same problem, which forces us to revert back to 7.5.0 for now. |
@hidroh! Thanks for response and the confirmation. I wanted to document this. |
It looks like this just needs a shadow for |
I also encountered the same issue, but I am not using play services...(Robolectric 3.0) java.lang.NullPointerException |
For those waiting for 3.1 release, setup your
|
I have filed this issue here: https://code.google.com/p/android/issues/detail?id=182868. I do not think this is really a Robolectric issue but I wanted this to be indexed by Google so we can start documenting support here.
For now, I have gone back to
7.5.0
.I recently received this exception when upgrading from
7.5.0
to7.8.0
. The tests worked fine before.What steps will reproduce the problem?
Exception running Robolectric:
<>.activity.MainActivityTest > activity_create_start_destroy_visible FAILED
java.lang.NullPointerException
at android.media.AudioManager.getMode(AudioManager.java:1674)
at com.google.android.gms.internal.zzgr$zza.zzA(Unknown Source)
at com.google.android.gms.internal.zzgr$zza.(Unknown Source)
at com.google.android.gms.internal.zzgs.zzD(Unknown Source)
at com.google.android.gms.internal.zzbz.(Unknown Source)
at com.google.android.gms.internal.zzhl.zzgk(Unknown Source)
at com.google.android.gms.internal.zzhl.zzb(Unknown Source)
at com.google.android.gms.ads.internal.zza.(Unknown Source)
at com.google.android.gms.ads.internal.zzb.(Unknown Source)
at com.google.android.gms.ads.internal.zzb.(Unknown Source)
at com.google.android.gms.ads.internal.zzc.(Unknown Source)
at com.google.android.gms.ads.internal.zzf.(Unknown Source)
at com.google.android.gms.ads.internal.client.zze.zza(Unknown Source)
at com.google.android.gms.ads.internal.client.zzy.zzcT(Unknown Source)
at com.google.android.gms.ads.internal.client.zzy.zzcS(Unknown Source)
at com.google.android.gms.ads.internal.client.zzy.zza(Unknown Source)
at com.google.android.gms.ads.AdView.loadAd(Unknown Source)
at <>.ads.Banner.loadAd(Banner.java:183)
at <>.ads.Banner.access$300(Banner.java:21)
at <>.ads.Banner$2.run(Banner.java:44)
at org.robolectric.util.Scheduler$ScheduledRunnable.run(Scheduler.java:269)
at org.robolectric.util.Scheduler.runOneTask(Scheduler.java:179)
at org.robolectric.util.Scheduler.advanceTo(Scheduler.java:160)
at org.robolectric.util.Scheduler.advanceBy(Scheduler.java:143)
at org.robolectric.util.Scheduler.unPause(Scheduler.java:54)
at org.robolectric.shadows.ShadowLooper.unPause(ShadowLooper.java:266)
at org.robolectric.shadows.ShadowLooper.runPaused(ShadowLooper.java:306)
at org.robolectric.shadows.CoreShadowsAdapter$2.runPaused(CoreShadowsAdapter.java:45)
at org.robolectric.util.ActivityController.create(ActivityController.java:118)
at org.robolectric.util.ActivityController.create(ActivityController.java:129)
at <>.activity.MainActivityTest.setUp(MainActivityTest.java:49)
Example Test:
The text was updated successfully, but these errors were encountered: