android 整合 maven 环境
我们再先整理一下思路:
使用eclipse:
1. 创建: adt自带的android创建插件 New -> android application project
2. 引入: import -> existing project into workspace
3. 打包: run as -> android application
使用maven:
1. 创建: maven archetype:generate (99: de.akquinet.android.archetypes:android-quickstart)
https://github.com/akquinet/android-archetypes
2. 运行: maven clean package android:deploy android:run (android-maven-plugin)
3. 引入eclipse:
a). mvn eclipse:eclipse
b). import -> android -> existing android code into workspace
c). 注意, 要选中 copy projects into workspace , 否则会有 overlaps 问题
d). 下次,已经存在.project .classpath, 直接导入已存在的java工程即可
4. 打包同上~~~
-----------------------------------------
用maven编译android并部署
<plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <version>3.1.1</version> <extensions>true</extensions> <configuration> <sdk> <platform>16</platform> </sdk> </configuration> </plugin>