I'm running this:
mvn clean install -Psign --debug
building, signing, etc all works fine (and the test build can find the app build, the app build installs, the test build installs, it can communicate with the device, etc.)
[INFO] SH175T502423_HTC_HTCSensation4G : Running tests for specified test classes/methods: [com.myapp.app.test.RegistrationActivityTestCase]
[INFO] SH175T502423_HTC_HTCSensation4G : Running instrumentation tests in com.myapp.app.test
[INFO] SH175T502423_HTC_HTCSensation4G : Run started: com.myapp.app.test, 1 tests:
[INFO] SH175T502423_HTC_HTCSensation4G : Start [1/1]: junit.framework.TestSuite$1#warning
[INFO] SH175T502423_HTC_HTCSensation4G : FAILURE:junit.framework.TestSuite$1#warning
[INFO] SH175T502423_HTC_HTCSensation4G : junit.framework.AssertionFailedError: Exception in constructor: testButtonVisibility (java.lang.NoClassDefFoundError: com.myapp.app.RegistrationActivity
at com.myapp.app.test.RegistrationActivityTestCase.<init>(RegistrationActivityTestCase.java:15)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:103)
at android.test.AndroidTestRunner.getTest(AndroidTestRunner.java:127)
at android.test.AndroidTestRunner.setTestClassName(AndroidTestRunner.java:55)
at android.test.suitebuilder.TestSuiteBuilder.addTestClassByName(TestSuiteBuilder.java:80)
at android.test.InstrumentationTestRunner.parseTestClass(InstrumentationTestRunner.java:426)
at android.test.InstrumentationTestRunner.parseTestClasses(InstrumentationTestRunner.java:407)
at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:362)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4424)
at android.app.ActivityThread.access$1300(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:537)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1677)
[INFO] SH175T502423_HTC_HTCSensation4G : End [1/1]: junit.framework.TestSuite$1#warning
[INFO] SH175T502423_HTC_HTCSensation4G : Run ended: 10 ms
[ERROR] SH175T502423_HTC_HTCSensation4G : FAILURES!!!
[INFO] Tests run: 1, Failures: 1, Errors: 0
[INFO] SH175T502423_HTC_HTCSensation4G : Report file written to C:\workspace\android\myappTest\target\surefire-reports\TEST-SH175T502423_HTC_HTCSensation4G.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:07.996s
[INFO] Finished at: Mon Jun 24 11:42:17 EDT 2013
[INFO] Final Memory: 22M/251M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:internal-integration-test (default-internal-integration-test) on project ecmobile-test: SH175T502423_HTC_HTCSensation4G : Tests failed on device. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:internal-integration-test (default-internal-integration-test) on project ecmobile-test: SH175T502423_HTC_HTCSensation4G : Tests failed on device.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
Caused by: org.apache.maven.plugin.MojoFailureException: SH175T502423_HTC_HTCSensation4G : Tests failed on device.
at com.jayway.maven.plugins.android.AbstractInstrumentationMojo$1.doWithDevice(AbstractInstrumentationMojo.java:407)
at com.jayway.maven.plugins.android.ScreenshotServiceWrapper.doWithDevice(ScreenshotServiceWrapper.java:56)
at com.jayway.maven.plugins.android.AbstractAndroidMojo$2.runDo(AbstractAndroidMojo.java:764)
at com.jayway.maven.plugins.android.AbstractAndroidMojo$DoThread.run(AbstractAndroidMojo.java:1275)
I've done my best to mirror everything about the morseflash example (https://github.com/jayway/maven-android-plugin-samples/tree/master/morseflash), but still can't figure this out.
I'm hoping someone else can help!
Related
I'm on Windows 7, I set all my proxies. As you can see it fails with error code 8, but anything I search for seems not to match my problem exactly.
When I try to build and run my app in cordova, I get this error. I have no idea what to do! Any advice? Thanks everyone!
C:\Users\310202751\Documents\CordovaProjects\Locator>cordova run
Running command: cmd "/s /c "C:\Users\310202751\Documents\CordovaProjects\Locato
r\platforms\android\cordova\run.bat""
ANDROID_HOME=C:\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_45
WARNING : No target specified, deploying to device '84deb82e'.
Running: C:\Users\310202751\Documents\CordovaProjects\Locator\platforms\android\
gradlew cdvBuildDebug -b C:\Users\310202751\Documents\CordovaProjects\Locator\pl
atforms\android\build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true
Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip
Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException
: Connection refused: connect
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketI
mpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
va:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket
Impl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:1168)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConn
ection.java:1104)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:998)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:932)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLCo
nnection.java:1512)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1440)
at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
at org.gradle.wrapper.Download.download(Download.java:45)
at org.gradle.wrapper.Install$1.call(Install.java:60)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:65)
... 3 more
Yesterday it work fine!
But today i can't run with debug junit test. I don't understand what happens.
Logcat:
17:25:43.540 [ERROR] [system.err] ERROR: transport error 202: connect failed: Connection refused
17:25:43.540 [QUIET] [system.out] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
17:25:43.540 [ERROR] [system.err] ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
17:25:43.541 [ERROR] [system.err] JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:741]
17:25:43.927 [ERROR] [org.gradle.process.internal.streams.ExecOutputHandleRunner] Could not write standard input into: Gradle Test Executor 2.
java.io.IOException: Broken pipe
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:318)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:50)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
UPD
In this question "Broken pipe error when running Gradle test" was a problem in antivirus. But I dont have it.
Did you have any connectivity issues?
ERROR: transport error 202: connect failed: Connection refused
I had similar problem when executing my tests through proxy.
Hello every one I am working on android boot strap for that I follow this link and I configure Maven on my linux machine. I also use Intellij for Android but I have some error.
error which I am getting when I try Maven command in my Android bootstrap project :
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) # com-example-demo-parent ---
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
Sep 07, 2013 4:33:51 PM org.sonatype.guice.bean.reflect.Logs$JULSink warn
WARNING: Error injecting: org.apache.maven.plugin.clean.CleanMojo
java.lang.NoClassDefFoundError: org/apache/maven/shared/model/fileset/FileSet
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
at java.lang.Class.getDeclaredConstructors(Class.java:1855)
at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:98)
at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:831)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:758)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:255)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:204)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:954)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:987)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:950)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1000)
at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:45)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:84)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:52)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
at org.sonatype.guice.plexus.lifecycles.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:138)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:108)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)
at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
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:601)
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)
Caused by: java.lang.ClassNotFoundException: org.apache.maven.shared.model.fileset.FileSet
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
... 54 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] demo parent ....................................... FAILURE [0.248s]
[INFO] demo app .......................................... SKIPPED
[INFO] Android-Bootstrap integration tests ............... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.483s
[INFO] Finished at: Sat Sep 07 16:33:52 IST 2013
[INFO] Final Memory: 7M/86M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.3:clean (default-clean) on project com-example-demo-parent: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.3:clean failed: A required class was missing while executing org.apache.maven.plugins:maven-clean-plugin:2.3:clean: org/apache/maven/shared/model/fileset/FileSet
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-clean-plugin:2.3
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/trainee02/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.3/maven-clean-plugin-2.3.jar
[ERROR] urls[1] = file:/home/trainee02/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.maven.shared.model.fileset.FileSet
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
error in my intellij project
please help . Thanx in advance .
well i find my answer after find lots of thing on he google is that . i change following settings:
my environment setting
export M2_HOME=/home/wideand04/mavehome/apache-maven-3.0.4
export PATH=/home/wideand04/mavehome/apache-maven-3.0.4/bin:${PATH}
and i use mave 3.0.4 binary and i get my solution thanks shiju B your link help me a lot
I had a similar problem when doing maven clean.
it was using maven-clean-plugin version 2.2 by default.
i forced version 2.5 by adding the following to my build and that solved the problem:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
</plugin>
This is the stack trace of the error which Is thrown when I do mvn install :
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.511s
[INFO] Finished at: Fri Jun 15 10:20:12 EDT 2012
[INFO] Final Memory: 14M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.2.0:dex (default-dex) on project dp-marketplace: MojoExecutionException: ANDROID-040-001: Could not execute: Command = /bin/sh -c cd /Users/dev/Workspace/App/dp-marketplace-android.git && /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xmx1024M -jar /Users/dev/Workspace/android-sdk-macosx/platform-tools/lib/dx.jar --dex --output=/Users/dev/Workspace/App/dp-marketplace-android.git/target/classes.dex /Users/dev/.m2/repository/org/ektorp/org.ektorp.android/1.3.1-SNAPSHOT/org.ektorp.android-1.3.1-SNAPSHOT.jar /Users/dev/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar /Users/dev/.m2/repository/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar /Users/dev/.m2/repository/commons-io/commons-io/2.0.1/commons-io-2.0.1.jar /Users/dev/.m2/repository/com/actionbarsherlock/library/4.1.0/library-4.1.0.apklib /Users/dev/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar /Users/dev/.m2/repository/org/khronos/opengl-api/gl1.1-android-2.1_r1/opengl-api-gl1.1-android-2.1_r1.jar /Users/dev/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar /Users/dev/.m2/repository/com/google/android/android/4.0.1.2/android-4.0.1.2.jar /Users/dev/.m2/repository/org/ektorp/org.ektorp/1.3.1-SNAPSHOT/org.ektorp-1.3.1-SNAPSHOT.jar /Users/dev/Workspace/App/dp-marketplace-android.git/target/classes /Users/dev/.m2/repository/org/apache/commons/commons-lang3/3.0.1/commons-lang3-3.0.1.jar /Users/dev/.m2/repository/org/apache/httpcomponents/httpclient/4.0.1/httpclient-4.0.1.jar /Users/dev/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar /Users/dev/.m2/repository/commons-fileupload/commons-fileupload/1.2.2/commons-fileupload-1.2.2.jar /Users/dev/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.7/jackson-core-asl-1.9.7.jar /Users/dev/.m2/repository/org/json/json/20080701/json-20080701.jar /Users/dev/.m2/repository/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar /Users/dev/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar /Users/dev/.m2/repository/com/couchbase/android/couchbase-dp/2.0.0-31/couchbase-dp-2.0.0-31.jar /Users/dev/.m2/repository/com/google/android/support-v4/r7/support-v4-r7.jar /Users/dev/.m2/repository/com/couchbase/android/OtpErlang/r14b03/OtpErlang-r14b03.jar /Users/dev/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.7/jackson-mapper-asl-1.9.7.jar /Users/dev/.m2/repository/org/apache/httpcomponents/httpclient-cache/4.1.2/httpclient-cache-4.1.2.jar /Users/dev/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar /Users/dev/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar /Users/dev/.m2/repository/com/comp/press/dp-android-library/0.1-SNAPSHOT/dp-android-library-0.1-SNAPSHOT.apklib /Users/dev/.m2/repository/com/comp/couch-transfer/1.0-SNAPSHOT/couch-transfer-1.0-SNAPSHOT.jar, Result = 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.2.0:dex (default-dex) on project dp-marketplace:
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:319)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException:
at com.jayway.maven.plugins.android.phase08preparepackage.DexMojo.runDex(DexMojo.java:232)
at com.jayway.maven.plugins.android.phase08preparepackage.DexMojo.execute(DexMojo.java:116)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: com.jayway.maven.plugins.android.ExecutionException: ANDROID-040-001: Could not execute: Command = /bin/sh -c cd /Users/dev/Workspace/App/dp-marketplace-android.git && /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xmx1024M -jar /Users/dev/Workspace/android-sdk-macosx/platform-tools/lib/dx.jar --dex --output=/Users/dev/Workspace/App/dp-marketplace-android.git/target/classes.dex /Users/dev/.m2/repository/org/ektorp/org.ektorp.android/1.3.1-SNAPSHOT/org.ektorp.android-1.3.1-SNAPSHOT.jar /Users/dev/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar /Users/dev/.m2/repository/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar /Users/dev/.m2/repository/commons-io/commons-io/2.0.1/commons-io-2.0.1.jar /Users/dev/.m2/repository/com/actionbarsherlock/library/4.1.0/library-4.1.0.apklib /Users/dev/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar /Users/dev/.m2/repository/org/khronos/opengl-api/gl1.1-android-2.1_r1/opengl-api-gl1.1-android-2.1_r1.jar /Users/dev/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar /Users/dev/.m2/repository/com/google/android/android/4.0.1.2/android-4.0.1.2.jar /Users/dev/.m2/repository/org/ektorp/org.ektorp/1.3.1-SNAPSHOT/org.ektorp-1.3.1-SNAPSHOT.jar /Users/dev/Workspace/App/dp-marketplace-android.git/target/classes /Users/dev/.m2/repository/org/apache/commons/commons-lang3/3.0.1/commons-lang3-3.0.1.jar /Users/dev/.m2/repository/org/apache/httpcomponents/httpclient/4.0.1/httpclient-4.0.1.jar /Users/dev/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar /Users/dev/.m2/repository/commons-fileupload/commons-fileupload/1.2.2/commons-fileupload-1.2.2.jar /Users/dev/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.7/jackson-core-asl-1.9.7.jar /Users/dev/.m2/repository/org/json/json/20080701/json-20080701.jar /Users/dev/.m2/repository/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar /Users/dev/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar /Users/dev/.m2/repository/com/couchbase/android/couchbase-dp/2.0.0-31/couchbase-dp-2.0.0-31.jar /Users/dev/.m2/repository/com/google/android/support-v4/r7/support-v4-r7.jar /Users/dev/.m2/repository/com/couchbase/android/OtpErlang/r14b03/OtpErlang-r14b03.jar /Users/dev/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.7/jackson-mapper-asl-1.9.7.jar /Users/dev/.m2/repository/org/apache/httpcomponents/httpclient-cache/4.1.2/httpclient-cache-4.1.2.jar /Users/dev/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar /Users/dev/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar /Users/dev/.m2/repository/com/comp/press/dp-android-library/0.1-SNAPSHOT/dp-android-library-0.1-SNAPSHOT.apklib /Users/dev/.m2/repository/com/comp/couch-transfer/1.0-SNAPSHOT/couch-transfer-1.0-SNAPSHOT.jar, Result = 1
at com.jayway.maven.plugins.android.CommandExecutor$Factory$1.executeCommand(CommandExecutor.java:215)
at com.jayway.maven.plugins.android.phase08preparepackage.DexMojo.runDex(DexMojo.java:230)
... 22 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I am fairly new to maven and I am not sure what exactly is the problem. Anyone has any suggestions as to how I should proceed to fix this issue?
Hmmm.. The android dependency should have a provided scope.. Adding a <scope>provided</scope> solved the problem..
Tried a sample-project with johannilssons android-actionbar plugin and it worked fine. Tried it on another project and got this error. Thoughts on how to proceed in locating the source of the error?
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HSR Android Frontend 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-android-plugin:2.8.4:generate-sources (default-generate-sources) # frontend-module ---
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] Copying local resource files to combined resource directory.
[INFO] C:\Google\android-sdk-windows/platform-tools/aapt.exe [package, -m, -J, C:\Users\Love\workspace\HSR\HSR\frontend-module\target\generated-sources\r, -M, C:\Users\Love\workspace\HSR\HSR\frontend-module\AndroidManifest.xml, -S, C:\Users\Love\workspace\HSR\HSR\frontend-module\target\generated-sources\combined-resources\res, -I, C:\Google\android-sdk-windows\platforms\android-7\android.jar]
[INFO] C:\Users\Love\workspace\HSR\HSR\frontend-module\target\generated-sources\combined-resources\res\layout\main.xml:18: error: Error: No resource found that matches the given name (at 'style' with value '#style/ActionBar').
[ERROR] Error when generating sources.
org.apache.maven.plugin.MojoExecutionException:
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:313)
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.execute(GenerateSourcesMojo.java:111)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
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:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
Caused by: com.jayway.maven.plugins.android.ExecutionException: ANDROID-040-001: Could not execute: Command = cmd.exe /X /C "C:\Google\android-sdk-windows\platform-tools\aapt.exe package -m -J C:\Users\Love\workspace\HSR\HSR\frontend-module\target\generated-sources\r -M C:\Users\Love\workspace\HSR\HSR\frontend-module\AndroidManifest.xml -S C:\Users\Love\workspace\HSR\HSR\frontend-module\target\generated-sources\combined-resources\res -I C:\Google\android-sdk-windows\platforms\android-7\android.jar", Result = 1
at com.jayway.maven.plugins.android.CommandExecutor$Factory$1.executeCommand(CommandExecutor.java:186)
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:311)
... 22 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
Make sure your res/values/styles.xml has the ActionBar style in it.