Error al crear un proyecto de Android con Maven

Estoy tratando de construir mi proyecto de Android con Maven para poder automatizar mis pruebas, pero estoy recibiendo el siguiente error:

D:\Projects\mtproject>mvn install [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building AppScience 1.0.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-android-plugin:2.8.4:generate-sources (default-generate-sources) @ appsci ence --- [INFO] ANDROID-904-002: Found aidl files: Count = 3 [INFO] ANDROID-904-002: Found aidl files: Count = 0 [INFO] Copying local resource files to combined resource directory. [INFO] C:\Program Files (x86)\Android\android-sdk/platform-tools/aapt.exe [package, -m, -J , D:\Projects\mtproject\target\generated-sources\r, -M, D:\Projects\mtproject\AndroidManif est.xml, -S, D:\Projects\mtproject\target\generated-sources\combined-resources\res, -A, D: \Projects\mtproject\assets, -I, C:\Program Files (x86)\Android\android-sdk\platforms\andro id-4\android.jar] [INFO] D:\Projects\mtproject\target\generated-sources\combined-resources\res\layout\main.x ml:2: error: Error: String types not allowed (at 'layout_height' with value 'match_parent' ). [INFO] D:\Projects\mtproject\target\generated-sources\combined-resources\res\layout\main.x ml:2: error: Error: String types not allowed (at 'layout_width' with value 'match_parent') . [INFO] D:\Projects\mtproject\target\generated-sources\combined-resources\res\layout\main.x ml:5: error: Error: String types not allowed (at 'layout_width' with value 'match_parent') . [INFO] D:\Projects\mtproject\target\generated-sources\combined-resources\res\layout\main.x ml:11: error: Error: String types not allowed (at 'layout_width' with value 'match_parent' ). [INFO] D:\Projects\mtproject\target\generated-sources\combined-resources\res\layout\splash .xml:2: error: Error: String types not allowed (at 'layout_width' with value 'match_parent '). [INFO] D:\Projects\mtproject\target\generated-sources\combined-resources\res\layout\splash .xml:2: error: Error: String types not allowed (at 'layout_height' with value 'match_paren t'). [ERROR] Error when generating sources. org.apache.maven.plugin.MojoExecutionException: at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.gen erateR(GenerateSourcesMojo.java:313) at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.exe cute(GenerateSourcesMojo.java:111) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPlugi nManager.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(Lifecyc leModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(Lifecyc leModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(Lifecy cleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.j ava: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.ja va: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.jav a: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:\Program Files (x86)\Android\android-sdk\platform-to ols\aapt.exe" package -m -JD:\Projects\mtproject\target\generated-sources\r -MD:\Project s\mtproject\AndroidManifest.xml -SD:\Projects\mtproject\target\generated-sources\combined -resources\res -AD:\Projects\mtproject\assets -I "C:\Program Files (x86)\Android\android- sdk\platforms\android-4\android.jar"", Result = 1 at com.jayway.maven.plugins.android.CommandExecutor$Factory$1.executeCommand(Comma ndExecutor.java:186) at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.gen erateR(GenerateSourcesMojo.java:311) ... 22 more [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.558s [INFO] Finished at: Fri Aug 26 04:00:16 CEST 2011 [INFO] Final Memory: 7M/45M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:maven-android- plugin:2.8.4:generate-sources (default-generate-sources) on project appscience: MojoExecut ionException: ANDROID-040-001: Could not execute: Command = cmd.exe /X /C ""C:\Program Fil es (x86)\Android\android-sdk\platform-tools\aapt.exe" package -m -JD:\Projects\mtproject\ target\generated-sources\r -MD:\Projects\mtproject\AndroidManifest.xml -SD:\Projects\mtp roject\target\generated-sources\combined-resources\res -AD:\Projects\mtproject\assets -I "C:\Program Files (x86)\Android\android-sdk\platforms\android-4\android.jar"", Result = 1 -> [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 foll owing articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 

¡No puedo averiguar cuál es el error!

Muchas gracias a todos de antemano!

OK Lo tengo: era un problema de configuración con el pom.xml:

 <plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> ................... <configuration> <sdk> <platform>17</platform> </sdk> </configuration> ............ 

Sólo asegúrese de elegir la versión SDK adecuada. El valor match_parent no es válido para las versiones anteriores que el SDK 1.6 de Android (tenía una <platform>4</platform> ).

  • Error al analizar xml: prefijo sin consolidar de com.google.android.gms.ads.AdView
  • Android Retrofit 2 Simple XML Converter
  • ImageViews en LinearLayout redondeado
  • Barra de herramientas empujando la barra de estado
  • Android Studio activity_main.xml editor de diseño no me deja arrastrar y soltar nada ...?
  • Android Switch Widget: Configuración de android: la pista hace que el pulgar y la pista no se muestren
  • Android: analiza XML desde problemas de cadena
  • ¿Cuál es la diferencia exacta entre gravedad y layout_gravity
  • Colocación de imágenes en android con ImageView en XML
  • Android: java.lang.NoClassDefFoundError: com.google.android.gms.R $ styleable
  • Android - No se puede resolver el símbolo "R"
  • FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.