Fixed
Status Update
Comments
su...@twofortyfouram.com <su...@twofortyfouram.com> #2
Further testing shows 11.0.0 works in this setup and 11.2.0 is the first version this appears.
pa...@google.com <pa...@google.com> #3
This is expected. Both libraries have a java resource called 'protobuf.meta', which either the library authors need to stop shipping or the build author needs to pick one. See https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
However, if both libraries actually depend on that java resource you are in trouble.
However, if both libraries actually depend on that java resource you are in trouble.
su...@twofortyfouram.com <su...@twofortyfouram.com> #4
I can confirm that specifying exclude or pick-first on protobuf.meta results in a successful build and no *immediate* problems. However, the contents of these two files are completely different and without understanding the purpose of these files (I assume related to protocol buffer data structure) it feels very treacherous to remove them.
pa...@google.com <pa...@google.com> #5
Stephan, do you know what that file does and what changed that meant that it has started being bundled as a java resource in the testing support library?
ar...@gmail.com <ar...@gmail.com> #6
I see the same issue in a module referencing com.google.android.gms:play-services-location and com.google.android.gms:play-services-maps after integrating com.google.firebase:firebase-core and com.google.firebase:firebase-perf in the app.
I am running `11.6.2` of all libraries as well as Gradle 4.3.1-all and support lib 26.1.0
I am running `11.6.2` of all libraries as well as Gradle 4.3.1-all and support lib 26.1.0
pa...@google.com <pa...@google.com> #7
Experiencing the same issue. Any verdict on how to fix this?
su...@twofortyfouram.com <su...@twofortyfouram.com>
nk...@google.com <nk...@google.com>
nk...@google.com <nk...@google.com> #8
This will be fixed in the next release of Espresso v3.0.2.
We will be stripping off protobuf.meta file from the release binaries since they are not actually needed at run time.
We will be stripping off protobuf.meta file from the release binaries since they are not actually needed at run time.
nk...@google.com <nk...@google.com> #9
Pleas give runner:1.0.1-alpha-1 a try and report back if you can still see this issue.
su...@twofortyfouram.com <su...@twofortyfouram.com> #10
After updating to alpha-1, the issue no longer reproduces.
az...@lyft.com <az...@lyft.com> #11
Confirming, Runner 1.0.1-alpha-1 fixes issue, thanks!
Description
Version used: Espresso 3.0.0
What steps will reproduce the problem?
1. Create a class that subclasses something from a newer API level, e.g. MyTileService extends android.service.quicksettings.TileService
2. Create a test case that exercises something different (not the code from step 1).
3. Run the tests on a device running an older version of Android, for example API 19
How are you running your tests (via Android Studio, Gradle, adb, etc.)?
adb
What is the expected output? What do you see instead?
Expected the test from step 2 to run.
Actually the tests fail with this exception
java.lang.ClassNotFoundException: com.twofortyfouram.ui.service.RuleEngineToggleTileService
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:251)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
I see the same problem with pulling in Google Play Services, which implements a JobService.
java.lang.ClassNotFoundException: com.google.android.gms.measurement.AppMeasurementJobService
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:251)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
at com.twofortyfouram.test.runner.ImprovedRunner.onStart(ImprovedRunner.java:45)