New Relic - java.io.IOException:文件存在

时间:2015-06-05 08:16:43

标签: android gradle newrelic

在尝试构建依赖于New Relic的Android项目时遇到问题。请参阅下面的成绩命令和堆栈跟踪。

命令:

./gradlew clean assembleProdDebug assembleProdDebugTest

见下面的终端输出:

...
:my-project:my-project:packageReleaseJniLibs[newrelic] Error encountered while loading the New Relic agent
java.io.IOException: File exists
at sun.tools.attach.BsdVirtualMachine.createAttachFile(Native Method)
at sun.tools.attach.BsdVirtualMachine.<init>(BsdVirtualMachine.java:74)
at sun.tools.attach.BsdAttachProvider.attachVirtualMachine(BsdAttachProvider.java:63)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
at com.sun.tools.attach.VirtualMachine$attach.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at com.newrelic.agent.android.NewRelicTask.injectAgent(NewRelicTask.groovy:45)
at com.newrelic.agent.android.NewRelicTask$injectAgent$0.callCurrent(Unknown Source)

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':my-project:newRelicInstrumentTask'.
> java.io.IOException: File exists

它抱怨“文件存在”,但它没有说明什么文件或在何处或如何解决它。

顶级build.gradle文件具有以下依赖关系:

classpath "com.newrelic.agent.android:agent-gradle-plugin:4.+"

并且两个应用程序中的每一个都具有以下内容:

compile 'com.newrelic.agent.android:android-agent:4.273.4'

New Relic和构建过程完美无缺,直到我将两个应用程序合并到同一个Android工作室项目中。我这样做是因为这两个应用程序彼此共享了很多代码。

有人遇到过同样的问题吗?关于如何解决它的任何想法?只要问你是否需要更多信息。

0 个答案:

没有答案
相关问题