android+adt+maven自动打包

MobilePlatform ----> pulltorefresh MobileWorkflow_3in1 Common MobileReport
MobileReport ---->TableFixHeaders shinobicharts-android-library wheel MobileWorkflow_3in1
MobileWorkflow_3in1 ----->MysoftCommon_3in1
MysoftCommon_3in1 ----->Common
Common ----->appcompat_v7
--->代表项目的依赖关系

MobilePlatform(主工程),其他引用的工程被我打成了apklib
pulltorefresh(apklib)--、MobileWorkflow_3in1(apklib)--、Common(apklib)--、MobileReport(apklib)--
TableFixHeaders(apklib)--、shinobicharts-android-library(apklib)--、wheel(apklib)--
MysoftCommon_3in1(apklib)--
appcompat_v7(apklib)--


这是我的pom.xml配置
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MobilePlatform</groupId>
<artifactId>MobilePlatform</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>apk</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform.version>4.1.1.4</platform.version>
<android.plugin.version>3.9.0-rc.3</android.plugin.version>
<android-platform>19</android-platform>
<android-maven-plugin-version>3.8.0</android-maven-plugin-version>
<maven-compiler-plugin-version>2.3.2</maven-compiler-plugin-version>
<java-version>1.7</java-version>
<org.springframework.android-version>1.0.0.RELEASE</org.springframework.android-version>
<server-address>xwdev.mysoft.com.cn:8020</server-address>
</properties>

<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${platform.version}</version>
<scope>provided</scope>
</dependency>
<!--
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r7</version>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>support-v7-appcompat</artifactId>
<version>1.0.0</version>
</dependency>
-->
<dependency>
<groupId>com.loopj.android</groupId>
<artifactId>android-async-http</artifactId>
<version>1.4.5</version>
</dependency>

<!-- 添加jar包 -->
<dependency>
<groupId>com.tencent.mm</groupId>
<artifactId>libammsdk</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.tencent.stat</groupId>
<artifactId>mtasdk</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.tencent</groupId>
<artifactId>opensdk</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.mysoft.im</groupId>
<artifactId>paimservice</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.pingan.frame</groupId>
<artifactId>paxinxinframe</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>uk.co.senab.photoview</groupId>
<artifactId>senab_photo</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4jandroid</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.mysoft</groupId>
<artifactId>xcl-charts</artifactId>
<version>1.0.0</version>
</dependency>
<!-- 引入apklib库 -->

<dependency>
<groupId>com.mysoft.comm</groupId>
<artifactId>commlib</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>

<dependency>
<groupId>com.mysoft.refresh</groupId>
<artifactId>pulltorefresh</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>

<dependency>
<groupId>com.mysoft.MobileWorkflow_3in1</groupId>
<artifactId>MobileWorkflow_3in1</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.mysoft.appcompat_v7</groupId>
<artifactId>appcompat_v7</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.mysoft.MobileReport</groupId>
<artifactId>MobileReport</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>

<dependency>
<groupId>com.mysoft.TableFixHeaders</groupId>
<artifactId>TableFixHeaders</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>

<dependency>
<groupId>com.mysoft.shinobicharts</groupId>
<artifactId>shinobicharts</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>

<dependency>
<groupId>com.mysoft.wheel</groupId>
<artifactId>wheel</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>

<dependency>
<groupId>com.mysoft.MysoftCommon_3in1</groupId>
<artifactId>MysoftCommon_3in1</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>

<!-- 添加so文件 -->
<dependency>
<groupId>com.mysoft</groupId>
<artifactId>libjpush163</artifactId>
<version>v1</version>
<classifier>armeabi</classifier>
<scope>runtime</scope>
<type>so</type>
</dependency>
<dependency>
<groupId>com.mysoft.v7</groupId>
<artifactId>libjpush163v7</artifactId>
<version>v7</version>
<classifier>armeabi</classifier>
<scope>runtime</scope>
<type>so</type>
</dependency>
<!-- 添加so文件 -->
<dependency>
<groupId>com.mysoft</groupId>
<artifactId>libshinobicharts</artifactId>
<version>v1</version>
<classifier>armeabi</classifier>
<scope>runtime</scope>
<type>so</type>
</dependency>
<dependency>
<groupId>com.mysoft</groupId>
<artifactId>libshinobichartsv7</artifactId>
<version>v7</version>
<classifier>armeabi</classifier>
<scope>runtime</scope>
<type>so</type>
</dependency>
<dependency>
<groupId>com.mysoft</groupId>
<artifactId>libshinobicharts-android-mips</artifactId>
<version>v2</version>
<classifier>armeabi</classifier>
<scope>runtime</scope>
<type>so</type>
</dependency>
<dependency>
<groupId>com.mysoft</groupId>
<artifactId>libshinobicharts-android-x86</artifactId>
<version>v3</version>
<classifier>armeabi</classifier>
<scope>runtime</scope>
<type>so</type>
</dependency>
</dependencies>
<profiles>
<!-- 输出目录,主要是替换mainfest文件中的变量值 -->
<profile>
<id>product</id>
<build>
<resources>
<resource>
<directory>${project.basedir}</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/filtered-manifest</targetPath>
<includes>
<include>AndroidManifest.xml</include>
</includes>
</resource>
</resources>
</build>
</profile>
</profiles>
<pluginRepositories>
<pluginRepository>
<id>oss.sonatype.org-jayway-snapshots</id>
<name>Jayway OpenSource SNAPSHOTs on Sonatype.org</name>
<url>http://oss.sonatype.org/content/repositories/jayway-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build>
<finalName>${project.artifactId}</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>${android.plugin.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<androidManifestFile>${project.build.directory}/filtered-manifest/AndroidManifest.xml</androidManifestFile>
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
<resourceDirectory>${project.basedir}/res</resourceDirectory>
<nativeLibrariesDirectory>${project.basedir}/libs</nativeLibrariesDirectory>
<sdk>
<path>${env.ANDROID_HOME}</path>
<platform>${android-platform}</platform>
</sdk>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
<!-- 解决aplib 找不到资源问题 -->
<attachSources>true</attachSources>
<sign>
<debug>false</debug>
</sign>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin-version}</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<!-- 签名 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>signing</id>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<inherited>true</inherited>
<configuration>
<archiveDirectory></archiveDirectory>
<includes>
<include>target/*.apk</include>
</includes>
<keystore>sign/mysoftPlatform_keystore.keystore</keystore>
<storepass>Mysoft95938</storepass>
<keypass>Mysoft95938</keypass>
<alias>mysoftplatform2014</alias>
<arguments>
<argument>-sigalg</argument>
<argument>MD5withRSA</argument>
<argument>-digestalg</argument>
<argument>SHA1</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

在打包时出现资源找不到的情况
[DEBUG] ANDROID-040-000: Executing command: Commandline = cmd.exe /X /C "D:\android-sdk-19\android-sdk-19\build-tools\19.0.0\aapt.exe package --non-constant-id -m -J E:\android\MobilePlatform\target\generated-sources\r --custom-package com.mysoft.mobilereport -M E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\AndroidManifest.xml -S E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res --auto-add-overlay -I D:\android-sdk-19\android-sdk-19\platforms\android-19\android.jar --output-text-symbols E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport"
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values\styles.xml:15: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values\styles.xml:54: error: Error retrieving parent for item: No resource found that matches the given name '@style/TextAppearance.Widget.AppCompat.ExpandedMenu.Item'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values\styles.xml:58: error: Error retrieving parent for item: No resource found that matches the given name '@style/Widget.AppCompat.Light.PopupMenu'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values\styles.xml:63: error: Error retrieving parent for item: No resource found that matches the given name '@style/Widget.AppCompat.ActionBar'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values\styles.xml:71: error: Error: No resource found that matches the given name: attr 'background'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values\styles.xml:73: error: Error: No resource found that matches the given name: attr 'displayOptions'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values\styles.xml:74: error: Error: No resource found that matches the given name: attr 'icon'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values\styles.xml:72: error: Error: No resource found that matches the given name: attr 'titleTextStyle'.
[INFO] E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res\values\styles.xml:79: error: Error retrieving parent for item: No resource found that matches the given name '@style/TextAppearance.AppCompat.Widget.ActionBar.Title'.
[DEBUG] ANDROID-040-000: Executed command: Commandline = cmd.exe /X /C "D:\android-sdk-19\android-sdk-19\build-tools\19.0.0\aapt.exe package --non-constant-id -m -J E:\android\MobilePlatform\target\generated-sources\r --custom-package com.mysoft.mobilereport -M E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\AndroidManifest.xml -S E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport\res --auto-add-overlay -I D:\android-sdk-19\android-sdk-19\platforms\android-19\android.jar --output-text-symbols E:\android\MobilePlatform\target\unpacked-libs\cmM_MobileReport", Result = 1
找了很久都没找到原因,有碰到的么?麻烦告诉我一下
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值