部署APK当重复文件 [英] Duplicate file when deploying apk

查看:261
本文介绍了部署APK当重复文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题似乎想出了几个人,但我一直没能应用解决方案,建议在其他线程怎的如此...

This problem seems to come up for a few people, but I haven't been able to apply the solution suggested in other threads for one reason or another so...

我想用嵌入式web服务器创建一个简单的Andr​​oid应用程序。选择,如果码头的服务器。我使用Maven来管理依赖与Maven的Andr​​oid的插件。我加码头服务器V8.x中与默认范围依赖。当我尝试和部署我的APK来我得到一个错误的沙箱

I am trying to build a simple android app with an embedded webserver. The server of choice if jetty. I am using maven to manage dependencies with the maven-android-plugin. I have added jetty-server v8.x as a dependency with the default scope. When I try and deploy my apk to the sandbox I get an error

找到重复文件APK:about.html

Found duplicate file for APK: about.html

所以,有问题的文件是从码头包,或者更确切地说,它是两个码头封装中,其中之一是码头服务器的依赖。其它线程在那里似乎是暗示我从一个罐子或其他删除该文件,但这是不是一个真正的可扩展解决方案,因为我不是罐子的主人。

So the file in question is from the jetty package, or rather it is found in two jetty packages, one being a dependency of jetty-server. Other threads out there seem to be suggest I delete the file from one jar or the other but this is not really a scalable solution as I am not the owner of the jars.

有一个较全面的解决这个问题?一些管理冲突和建立或部署的时间?

Is there a more general solution to this problem? Something that manages the conflict and build or deploy time?

我要说明,我是一个有点小白的Java,并且已经在NetBeans和Maven的路线,因为这是该工具包我熟悉。

I should note, I am a bit of a Java noob, and have gone the NetBeans and maven route because this is the toolkit I'm familiar with.

推荐答案

好了,找到了。解决的办法是建立一个使用下面的命令

OK, found it. The solution is to build using the following command

mvn android:deploy -Dandroid.extractDuplicates=true

这篇关于部署APK当重复文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆