在使用maven构建
Android APP时,我会在下面遇到异常
> [ERROR] Cannot add resources from
> ~/.m2/repository/com/inmobi/androidsdk/AdNetwork/3.5.4/AdNetwork-3.5.4.jar
> com.android.sdklib.build.DuplicateFileException: Duplicate files at
> the same path inside the APK at
> com.android.sdklib.build.ApkBuilder$JavaAndNativeResourceFilter.checkEntry(ApkBuilder.java:125)
> at
> com.android.sdklib.internal.build.SignedJarBuilder.writeZip(SignedJarBuilder.java:228)
> at
> com.android.sdklib.build.ApkBuilder.addResourcesFromJar(ApkBuilder.java:576)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606) at
> com.jayway.maven.plugins.android.phase09package.ApkBuilder.addResourcesFromJar(ApkBuilder.java:292)
> at
> com.jayway.maven.plugins.android.phase09package.ApkMojo.doAPKWithAPKBuilder(ApkMojo.java:586)
> at
> com.jayway.maven.plugins.android.phase09package.ApkMojo.createApkFile(ApkMojo.java:356)
> at
> com.jayway.maven.plugins.android.phase09package.ApkMojo.execute(ApkMojo.java:307)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at
> org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at
> org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at
> org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606) at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
我已将sdk jar(AdNetwork-3.5.4.jar)添加到我的本地存储库并在我的pom中添加了依赖项
有谁知道如何解决这一问题 ?