New manifest merger fails when using double-espresso and app minSdkVersion is >8

469 views
Skip to first unread message

Edward Dale

unread,
Jun 9, 2014, 12:24:22 PM6/9/14
to adt...@googlegroups.com

I'm using Jake Wharton's double-espresso (https://github.com/JakeWharton/double-espresso). I've just updated my app to version 0.11.1 of the gradle build tools and get the following error when building now:

...
:app:processMyBadassAppDebugTestManifest
/Users/scompt/MyBadassApp/android/build/intermediates/exploded-aar/com.jakewharton.espresso/espresso/1.1-r3/AndroidManifest.xml:0:0 Error:
    uses-sdk:minSdkVersion 8 cannot be smaller than version 15 declared in library test manifest
:app:processMyBadassAppDebugTestManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processMyBadassAppDebugTestManifest'.
> java.lang.RuntimeException: Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 15 declared in library test manifest

I can workaround the error by either using the old manifest merger:

android {
    useOldManifestMerger true
    ...
}

or by setting the minSdkVersion of my app to 8, which obviously isn't a workable solution.

Diego Costantini

unread,
Jun 10, 2014, 4:25:08 AM6/10/14
to adt...@googlegroups.com
Same issue :(

Diego Costantini

unread,
Jun 10, 2014, 6:26:21 AM6/10/14
to adt...@googlegroups.com

Xavier Ducrohet

unread,
Jun 10, 2014, 8:50:39 PM6/10/14
to adt...@googlegroups.com
The problem is that your app is declaring minSdkVersion 8 but you're depending on something that require 15+

Since it's for a test app, we can fix this by making your test app only work on API 15, but then we need to handle different minSdkVersion for the main app and the test app (and of course this will restrict where you can test your app).


--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Diego Costantini

unread,
Jun 11, 2014, 12:49:42 AM6/11/14
to adt...@googlegroups.com

Doesn't it make sense to check the most restrictive combination and apply that one?
As I see it, the lib should have at least all compatibilities required by the app.
The problem is when the lib would be more restrictive, then I should be warned (at least).

Sent from my Nexus 4

You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/-Km7VgExKf4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

Jake Wharton

unread,
Jun 11, 2014, 12:54:19 AM6/11/14
to adt...@googlegroups.com
The library in this case is min=8 and the app is min=15, from my understanding.

Diego Costantini

unread,
Jun 11, 2014, 1:18:31 AM6/11/14
to adt...@googlegroups.com

According to the error, yes, and I think these are not conditions to fail the build.
The other way around would be.

Sent from my Nexus 4

Xavier Ducrohet

unread,
Jun 11, 2014, 5:38:20 PM6/11/14
to adt...@googlegroups.com
yeah we identified the problem, fix is on its way. I was just completely confused :)

Diego Costantini

unread,
Jun 11, 2014, 5:48:27 PM6/11/14
to adt...@googlegroups.com

Yay, thanks :)

Sent from my Nexus 4

Diego Costantini

unread,
Jun 13, 2014, 5:31:26 AM6/13/14
to adt...@googlegroups.com
Is a minor update coming out following the new AS 0.6.1?
This issue here is blocking, and since the fix should be already reviewed... ;)

Jake Wharton

unread,
Jun 13, 2014, 11:09:34 AM6/13/14
to adt...@googlegroups.com
They usually update AS weekly(ish) if you're on the canary. The impending I/O onslaught might slow things down, though. 

Diego Costantini

unread,
Jun 13, 2014, 11:14:22 AM6/13/14
to adt...@googlegroups.com

I thought so, but even a mini tiny release with only that fix would be good, and affordable in the IO race ;)

Sent from my Nexus 4

Jake Wharton

unread,
Jun 13, 2014, 11:26:59 AM6/13/14
to adt...@googlegroups.com

If the fix lands in AOSP then building your own Android Studio is easy. Clone the project using repo, cd tools/idea, ant.

Diego Costantini

unread,
Jun 13, 2014, 11:35:36 AM6/13/14
to adt...@googlegroups.com

It's just the gradle plugin, in particular the manifest merger.
I could turn it off and use the old one, but then all the package name replacement would fail.
I could try to prepare a Linux system to build the tools, but I'll wait until Monday when I'm back in the office, maybe something will happen in the meanwhile :D

Sent from my Nexus 4

Jake Wharton

unread,
Jun 13, 2014, 11:45:40 AM6/13/14
to adt...@googlegroups.com
Oh, right. Too much context switching. The Gradle plugin is easy to build as well and you don't need a linux system. It's just Java built with Gradle so any system that can build Android should be able to build the plugin. I forget the exact command, but it's documented on the tools site at the prior link.

Diego Costantini

unread,
Jun 13, 2014, 11:50:15 AM6/13/14
to adt...@googlegroups.com
Oh, thanks, I will look again.
I definitely got lost, because as far as I understood/found, I need to get it from the tools, which have been separated recently from the whole AOSP.
I tried to just find that repository so I could get that alone with git, but I only found instructions for Linux/Mac (repo ...) and browsing through it I didn't see the structure I expected, so I assumed the repo command would take care of that.

Diego Costantini

unread,
Jun 17, 2014, 10:33:16 AM6/17/14
to adt...@googlegroups.com
It has been published within minutes after I prepared a Linux machine, built it myself, moved it to Windows (meh...) and checked my Espresso tests. :D
Good timing :p
I am waiting for the changelog.

@Xavier: could you please mention also the change to the output folders? I saw by accident that now apks (and more) are in build/outputs/apk, and that broke most of my CI builds. It is quite easy to figure, but I think it should be mentioned in changelogs.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/-Km7VgExKf4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/-Km7VgExKf4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/-Km7VgExKf4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages