I use Robolectric for unit tests, I have Google Play Services in my project. This worked fine until yesterday, when Google Play Services upgraded to the new version. I get this error:
java.lang.NullPointerException at com.google.android.gms.common.GooglePlayServicesUtil.zzh(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.zzd(Unknown Source) at com.google.android.gms.common.GoogleApiAvailability.isGooglePlayServicesAvailable(Unknown Source) at com.google.android.gms.common.api.zzg$zze.zznn(Unknown Source) at com.google.android.gms.common.api.zzg$zzi.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Process finished with exit code 255
It seems that the Shadow class is not called, the GooglePlayServicesUtil method is called, which throws a NullPointerException. Has anyone seen this?
I donβt even use Google Play services in tests.
android google-play-services robolectric
Christine
source share