I am trying to build an Android Library for existing Java Library. In my Java library there is annotation called org.wso2.siddhi.annotation.Extension
When I try to add this annotation to a class I get the following error.
Error:Execution failed for task ':siddhiservice:transformClassesAndResourcesWithSyncLibJarsForDebug'.
> java.util.zip.ZipException: duplicate entry: META-INF/annotations/org.wso2.siddhi.annotation.Extension
This is my class implementation.
package org.wso2.siddhiservice.sensors.proximity;
import org.wso2.siddhi.annotation.Example;
import org.wso2.siddhi.annotation.Extension;
@Extension(
name = "proximity",
namespace="source",
description = "Get events from the proximity sensor",
examples = @Example(description = "TBD",syntax = "TBD")
)
public class ProximitySensorSource extends Source {
}
If I just remove the @extension and clean the project it works fine. Problem happens only when I add the annotation.These are my libraries.
What is the solution for this?