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.
精彩评论