asifurrouf / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
0 stars 0 forks source link

Prebuilt binaries provide/use inconsistent versions of Dagger #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Prebuilt binaries from 
git+https://code.google.com/p/android-test-kit/@5c1ba48f3b192a2bf851da4353b0ddf4
8286e523
provide/use inconsistent versions of Dagger:

- bin/espresso2.0/espresso-core-2.0.jar tries to call ModuleAdapter's 
constructor with 7 arguments

- bin/espresso-dependencies/dagger-1.1.0.jar provides a ModuleAdapter's 
constructor that takes 6 arguments

- bin/espresso-dependencies/dagger-compiler-1.1.0.jar generates a call to the 
constructor that provides 6 arguments

This means that the prebuilt binaries fail at runtime with an error like below:
java.lang.NoSuchMethodError: No direct method <init>(
        Ljava/lang/Class;  <---PROBLEM---
        [Ljava/lang/String;
        [Ljava/lang/Class;
        Z
        [Ljava/lang/Class;
        Z
        Z)
        V in class Ldagger/internal/ModuleAdapter; or its super classes

Original issue reported on code.google.com by luka...@chromium.org on 9 Apr 2015 at 9:21

GoogleCodeExporter commented 9 years ago
Espresso 2.0 depends on dagger 1.2.1, so if you're building from source, please 
use that.

Original comment by vale...@google.com on 9 Apr 2015 at 11:52

GoogleCodeExporter commented 9 years ago
I am not building from source (I am using prebuilt binaries at the location 
pointed out in the original report), so I think comment #1 doesn't apply.

Original comment by luka...@chromium.org on 21 Apr 2015 at 11:26

GoogleCodeExporter commented 9 years ago
espresso-core-2.0.jar doesn't contain the dagger dep, so you need to provide it 
as part of your build. Use dagger 1.2.1 or later (you can get it from maven 
central).

Note: in the next release (2.2) we are going to switch to dagger 2.0, which 
will remove the runtime dependency requirement and this problem will go away.

Original comment by vale...@google.com on 28 Apr 2015 at 5:28