Error in Android bootstrap? - android

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>

Related

Jenkins gradle sonarQube Android

I have to setup a job on Jenkins to build an Android Application. I have also a SonarQube server which is accessible at http://x.x.x.198/sonar.
I added a shell script that will be called to launch sonarqube analysis on the project.
SonarQube server and Jenkins run on different server, and I can access to the SonarQube host from Jenkins machine.
The build failed and here is the console output:
./gradlew sonarqube --stacktrace -Dsonar.url.host=http://x.x.x.198/sonar
Parallel execution with configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:sonarqubeSonarQube server [http://x.x.x.198/sonar] can not be reached
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:sonarqube'.
> Unable to execute SonarQube
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:sonarqube'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:83)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 14 more
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:93)
at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75)
... 28 more
Caused by: java.lang.IllegalStateException: Status returned by url [http://10.133.64.198/sonar/batch_bootstrap/index] is not valid: [403]
at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:116)
at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:78)
... 31 more
BUILD FAILED
Total time: 1.632 secs
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Has anyone already faced this problem? Need help :|
Thanks in advance.
Finaly found why it doesn't work. In my gradle.properties, i had specified some proxy properties. I have removed these entries (host, port, login, password, ...) so when sonarqube task is called, gradle does not use any proxy to access the SonarQube server. The task finished successfully on Jenkins and analysis reports uploaded to sonarqube server :).
This post helped me Sonarqube grade build failed with "SonarQube server [http://x.12.11.18:9000] can not be reached"
Hope this will help others.
2.7.1 is not back-compatible. Lock your plugin version to 2.6 in your pom.xml or upgrade your SonarQube
Workaround: Adding -Dsonar.host.url=http://my.server:9000 to mvn command works for me
Better than disabling the plugin, you may fix the plugin version to
2.6, which works fine, taking into account sonar.host.url.
For instance, with Maven in my case:
<pluginManagement>
</plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.6</version>
<!-- sonar.host.url not working with version 2.7 -->
</plugin>
</plugins>
</pluginManagement>

Appcelerator - androdi.support.v4

When I compile the project this error appears:
[ERROR] : Failed to compile Java source files:
[ERROR] :
[ERROR] : /Users/acavero/Documents/Titanium_Studio_Workspace/Manager/build/android/gen/es/renr/manager/ManagerActivity.java:5: error: cannot access TaskStackBuilder
[ERROR] : public final class ManagerActivity extends TiRootActivity
[ERROR] : ^
[ERROR] : class file for android.support.v4.app.TaskStackBuilder not found
[ERROR] : /Users/acavero/Documents/Titanium_Studio_Workspace/Manager/build/android/gen/es/renr/manager/ManagerApplication.java:149: error: cannot access FragmentActivity
[ERROR] : org.appcelerator.titanium.TiVerify verify = new org.appcelerator.titanium.TiVerify(rootActivity, this);
[ERROR] : ^
[ERROR] : class file for android.support.v4.app.FragmentActivity not found
[ERROR] : Note: /Users/acavero/Documents/Titanium_Studio_Workspace/Manager/build/android/gen/es/renr/manager/AssetCryptImpl.java uses unchecked or unsafe operations.
[ERROR] : Note: Recompile with -Xlint:unchecked for details.
[ERROR] : 2 errors
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous> (/Users/acavero/.appcelerator/install/4.0.2/package/node_modules/appc-cli-titanium/plugins/run.js:84:66)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)
[ERROR] Application Installer abnormal process termination. Process exit value was 1
I haven't got any idea to what is happening...
It's an appcelerator project (alloy) so I can't add de library (.jar) to the project I think..
Please help me
Thank you.
*** SOLUTION ****
The only solution I found is include a module with this library. But it's a pity have to create a module only for this library...
You might want to bring this up in the official Q&A at http://community.appcelerator.com and include information about the Titanium SDK and Android min/target versions set in your tiapp.xml.

android-maven-plugin running instrumentation tests failing with NoClassDefFoundError

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!

Android Maven : LifecycleExecutionException

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..

Android ActionBar causing build-error (No resource found)

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.

Categories

Resources