[Gradle] Library dep on library throws exception

1,349 views
Skip to first unread message

Jake Wharton

unread,
May 19, 2013, 7:28:59 PM5/19/13
to adt...@googlegroups.com
The 0.4 tooling will throw an exception when a library project depends on another library project when neither has an <Application> tag in their manifests. Is this required?

:foo:processDebugManifest
[AndroidManifest.xml:1] Could not find element /manifest/application.
[AndroidManifest.xml:1] Could not find element /manifest/application.
[AndroidManifest.xml:1] Could not find element /manifest/application.
[AndroidManifest.xml:1] Could not find element /manifest/application.
[AndroidManifest.xml:1] Could not find element /manifest/application.
[AndroidManifest.xml:1] Could not find element /manifest/application.
[AndroidManifest.xml:1] Could not find element /manifest/application.
:foo:processDebugManifest FAILED

Caused by: java.lang.RuntimeException
at com.android.builder.AndroidBuilder.doMerge(AndroidBuilder.java:475)
at com.android.builder.AndroidBuilder.mergeLibraryManifests(AndroidBuilder.java:461)
at com.android.builder.AndroidBuilder.processManifest(AndroidBuilder.java:301)
at com.android.builder.AndroidBuilder$processManifest.call(Unknown Source)
at com.android.build.gradle.tasks.ProcessAppManifest.doFullTaskAction(ProcessAppManifest.groovy:65)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.groovy:71)
at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:216)
at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:122)
at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
at com.android.build.gradle.tasks.ProcessAppManifest_Decorated.invokeMethod(Unknown Source)
at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:217)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:199)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:526)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:509)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 67 more

Xavier Ducrohet

unread,
May 19, 2013, 8:23:14 PM5/19/13
to adt...@googlegroups.com
It shouldn't be. I'll fix this for 0.5


--
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/groups/opt_out.
 
 



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

Please do not send me questions directly. Thanks!

Jonathan Steele

unread,
Jun 3, 2013, 1:40:11 AM6/3/13
to adt...@googlegroups.com
put <application /> on mainfest

On Sunday, June 2, 2013 11:57:42 PM UTC-4, Daniel Sargeant wrote:
Is there a workaround for this in the meantime?

Thanks,
Daniel

Fabian Frank

unread,
Sep 4, 2013, 7:19:35 PM9/4/13
to adt...@googlegroups.com
Hi Xavier,


I still see this error when building an app whose dependency tree looks like this:
MyApp --> MyLibraryOne --> MyLibraryTwo

Neither library has an application tag in its AndroidManifest.xml. The workaround mentioned by Jonathan does not fix the issue, the build crashes if there is an empty <application /> tag in the manifest of the library.


Regards,
Fabian

Fabian Frank

unread,
Sep 4, 2013, 7:26:03 PM9/4/13
to adt...@googlegroups.com
I'm sorry, the workaround does work. There was another unrelated issue that caused confusion.


On Sunday, May 19, 2013 5:23:14 PM UTC-7, Xavier Ducrohet wrote:

k.hirowatari

unread,
Jan 25, 2014, 7:40:10 AM1/25/14
to adt...@googlegroups.com
I use 0.8. But I see same error.
This problem not fixed yet?

2013年5月20日月曜日 9時23分14秒 UTC+9 Xavier Ducrohet:

Fabian Frank

unread,
Jan 27, 2014, 1:34:43 PM1/27/14
to adt...@googlegroups.com
I also use 0.8 now and still had to apply the empty application tag workaround 2 day ago.

Regards,
Fabian
> 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/wFnAOAmYCSs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages