我正在尝试在 Jenkins 上构建一个 Android 应用程序,但是它失败了,并出现了一条模糊的错误消息。该应用程序在我的机器上使用 Maven 构建良好,但在 Jenkins 上不起作用。我四处寻找解决方案,它说更新我所做的android SDK,但它并没有解决问题。这是完整的堆栈跟踪。
注意:我将 Google Play 服务和 Facebook SDK 项目作为依赖项引用。
mavenExecutionResult exceptions not empty message : Failed to execute goal
com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:dex (default-dex) 项目 lv2-geosafe: 原因:堆栈跟踪:org.apache.maven.lifecycle.LifecycleExecutionException: 失败在项目 lv2-geosafe: at org.apache.maven.lifecycle.internal.MojoExecutor 上执行目标 com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:dex (default-dex)。在 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 在 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 执行(MojoExecutor.java:217)在 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 在 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)。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) 在 org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 在 org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 在 sun.reflect.NativeMethodAccessorImpl.invoke0 (本机方法)在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在 java.lang.reflect.Method.invoke(Method.java:597 ) 在 org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) 在 org.codehaus.plexus.classworlds.launcher。Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:98) at hudson.maven .Maven3Builder.call(Maven3Builder.java:64) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run (Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask .run(FutureTask.java:138) 在 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 在 java.朗。Thread.run(Thread.java:662) 引起:org.apache.maven.plugin.MojoExecutionException: at com.jayway.maven.plugins.android.phase08preparepackage.DexMojo.runDex(DexMojo.java:382) at com.jayway .maven.plugins.android.phase08preparepackage.DexMojo.execute(DexMojo.java:145) 在 org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) 在 org.apache.maven.lifecycle.internal.MojoExecutor .execute(MojoExecutor.java:209) ... 27 更多原因:com.jayway.maven.plugins.android.ExecutionException:ANDROID-040-001:无法执行:命令 = /bin/sh -c cd /root /.hudson/jobs/lv2/workspace/lv2-geosafe && /usr/local/jdk1.6.0_23/jre/bin/java -Xmx1024M -jar /usr/local/android-sdk/platform-tools/lib/dx. jar --dex --output=/root/.hudson/jobs/lv2/workspace/lv2-geosafe/target/classes.dex /root/.m2/repository/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar /root/。 m2/repository/com/unboundid/unboundid-ldapsdk/2.3.3/unboundid-ldapsdk-2.3.3.jar /root/.m2/repository/com/terrapages/mapapi/mapapi/1.0.0/mapapi-1.0.0 .jar /root/.m2/repository/com/google/android/gms/google-play-services/2.3.0/google-play-services-2.3.0.jar /root/.hudson/jobs/lv2/workspace /lv2-util/target/lv2-util.jar /root/.m2/repository/com/google/android/support-v4/r7/support-v4-r7.jar /root/.m2/repository/org/hibernate /javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar /root/.hudson/jobs/lv2/workspace/lv2-model/目标/lv2-model.jar /root/.m2/repository/org/hibernate/hibernate-commons-annotations/3.2.0.Final/hibernate-commons-annotations-3.2.0.Final.jar /root/.m2/repository/com/terrapages/ims/model/1.0.7/model-1.0.7.jar /root/.m2/repository/org/hibernate/hibernate-annotations/3.5.6-Final/hibernate-annotations-3.5 .6-Final.jar /root/.m2/repository/com/github/avianey/facebook-android-api/3.0.1/facebook-android-api-3.0.1.jar /root/.m2/repository/ch /acra/acra/4.4.0/acra-4.4.0.jar /root/.m2/repository/com/github/avianey/facebook-android-api/3.0.1/facebook-android-api-3.0.1。 apklib /root/.hudson/jobs/lv2/workspace/lv2-api/target/lv2-api-1.0.2-SNAPSHOT.jar /root/.m2/repository/com/terrapages/ims/util/1.0.7/ util-1.0.7.jar /root/.hudson/jobs/lv2/workspace/lv2-geosafe/target/classes /root/.m2/repository/com/google/android/gms/google-play-services/2.3。 0/google-play-services-2.3.0.apklib /root/.m2/repository/com/terrapages/ims/api/1.0.7/api-1.0.7.jar,com.jayway.maven 的结果 = 1 .插件。com.jayway.maven.plugins.android.phase08preparepackage.DexMojo.runDex(DexMojo.java:378) 的 android.CommandExecutor$Factory$DefaultCommandExecutor.executeCommand(CommandExecutor.java:246) ... 30 多个频道停止完成:失败