我在android studio中生成一个已签名的apk但我收到了以下错误:
错误:任务执行失败':msapp_V_520:transformClassesWithJarMergingForRelease'。 com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / annotation / ColorRes.class
这是我的 build.gradle
public static Visual GetChildrenByType(Visual visualElement, Type typeElement, string nameElement)
{
if (visualElement == null) return null;
if (visualElement.GetType() == typeElement)
{
FrameworkElement fe = visualElement as FrameworkElement;
if (fe != null)
{
if (fe.Name == nameElement)
{
return fe;
}
}
}
Visual foundElement = null;
if (visualElement is FrameworkElement)
(visualElement as FrameworkElement).ApplyTemplate();
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(visualElement); i++)
{
Visual visual = VisualTreeHelper.GetChild(visualElement, i) as Visual;
foundElement = GetChildrenByType(visual, typeElement, nameElement);
if (foundElement != null)
break;
}
return foundElement;
}
答案 0 :(得分:0)
在添加support-v4
dependeicy。
facebook
模块
compile (project(':facebook')) {
exclude module: 'support-v4'
}