今天折腾了一天把android maven 插件在eclipse 上安装成功。然后启动总是报错。


[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:andr

oid-maven-plugin:3.6.0:run (default-cli) on project androiddemo: Unable to run l

auncher Activity: Starting: Intent { cmp=org.xiami.androiddemo/.HelloAndroidActi

vity }

[ERROR] Error type 3

[ERROR] Error: Activity class {org.xiami.androiddemo/org.xiami.androiddemo.Hello

AndroidActivity} does not exist.

[ERROR] -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[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 rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc

eption


原因是使用命令错误。我使用的启动命令为 mvn android:run 不过此时项目并没有部署到设备上。 当然也是文档没有细读的原因。正确的命令是


mvn clean install android:deploy android:run