我可以通过intellij的想法将zxing作为AndroidLibrary包含到我的项目中而没有问题,但是当我想用maven编译它时,它会给出错误。这是我的pom.xml和错误
的pom.xml
<?xml version="1.0" encoding="utf-8"?>
<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>com.somecompany.zxing</groupId>
<artifactId>zxing</artifactId>
<version>1.0.0</version>
<packaging>apklib</packaging>
<name>zxing library</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform.version>4.1.1.4</platform.version>
<sdk_path>D:\Android</sdk_path>
</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>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<sdk>
<platform>10</platform>
<path>${sdk_path}</path>
</sdk>
<dexOptimize>false</dexOptimize>
<dex>
<preDex>false</preDex>
<preDexLibLocation>/tmp/predexedLibs</preDexLibLocation>
</dex>
<dexCoreLibrary>true</dexCoreLibrary>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
错误
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building zxing library 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ zxing ---
[INFO] Deleting D:\Projects\Inherd\Libraries\trunk\zxing\target
[INFO]
[INFO] --- android-maven-plugin:3.8.0:generate-sources (default-generate-sources) @ zxing ---
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] Manifest merging disabled. Using project manifest only
[INFO] D:\Android\build-tools\19.0.1\aapt.exe [package, --non-constant-id, -m, -J, D:\Projects\Inherd\Libraries\trunk\zxing\target\generated-sources\r, -M, D:\Projects\Inherd\Libraries\trunk\zxing\AndroidManifest.xml, -S, D:\Projects\Inherd\Libraries\trunk\zxing\res, --auto-add-overlay, -A, D:\Projects\Inherd\Libraries\trunk\zxing\assets, -I, D:\Android\platforms\android-10\android.jar]
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ zxing ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] skip non existing resourceDirectory D:\Projects\Inherd\Libraries\trunk\zxing\target\generated-sources\extracted-dependencies\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ zxing ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 78 source files to D:\Projects\Inherd\Libraries\trunk\zxing\target\classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/share/ShareActivity.java: Some input files use or override a deprecated API.
[WARNING] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/share/ShareActivity.java: Recompile with -Xlint:deprecation for details.
[INFO] 2 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/camera/CameraManager.java:[26,24] cannot find symbol
symbol: class PlanarYUVLuminanceSource
location: package com.google.zxing
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/camera/CameraManager.java:[300,10] cannot find symbol
symbol: class PlanarYUVLuminanceSource
location: class com.google.zxing.client.android.camera.CameraManager
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHandler.java:[23,24] cannot find symbol
symbol: class PlanarYUVLuminanceSource
location: package com.google.zxing
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHandler.java:[110,39] cannot find symbol
symbol: class PlanarYUVLuminanceSource
location: class com.google.zxing.client.android.DecodeHandler
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[141,19] cannot find symbol
symbol: method getValueType()
location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[147,19] cannot find symbol
symbol: method getValueType()
location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[152,19] cannot find symbol
symbol: method getValueType()
location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[157,19] cannot find symbol
symbol: method getValueType()
location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[172,19] cannot find symbol
symbol: method getValueType()
location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[194,80] cannot find symbol
symbol: method getValueType()
location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[218,21] cannot find symbol
symbol: method getValueType()
location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[223,23] cannot find symbol
symbol: method getValueType()
location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java:[745,76] cannot find symbol
symbol: variable UPC_EAN_EXTENSION
location: class com.google.zxing.ResultMetadataType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java:[748,88] cannot find symbol
symbol: variable UPC_EAN_EXTENSION
location: class com.google.zxing.ResultMetadataType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/camera/CameraManager.java:[306,16] cannot find symbol
symbol: class PlanarYUVLuminanceSource
location: class com.google.zxing.client.android.camera.CameraManager
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHandler.java:[78,5] cannot find symbol
symbol: class PlanarYUVLuminanceSource
location: class com.google.zxing.client.android.DecodeHandler
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/wifi/WifiConfigManager.java:[131,35] cannot find symbol
symbol: method isHidden()
location: variable wifiResult of type com.google.zxing.client.result.WifiParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/encode/QRCodeEncoder.java:[304,57] cannot find symbol
symbol: method getURLs()
location: variable contact of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/AddressBookResultHandler.java:[126,33] cannot find symbol
symbol: method getNicknames()
location: variable addressResult of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/AddressBookResultHandler.java:[138,33] cannot find symbol
symbol: method getURLs()
location: variable addressResult of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/AddressBookResultHandler.java:[140,33] cannot find symbol
symbol: method getGeo()
location: variable addressResult of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/AddressBookResultHandler.java:[196,36] cannot find symbol
symbol: method getURLs()
location: variable result of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[65,40] cannot find symbol
symbol: method getOrganizer()
location: variable calendarResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[76,38] cannot find symbol
symbol: method isStartAllDay()
location: variable calendarResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[80,38] cannot find symbol
symbol: method getAttendees()
location: variable calendarResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[150,36] incompatible types
required: java.util.Date
found: java.lang.String
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[151,46] cannot find symbol
symbol: method isStartAllDay()
location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[153,32] incompatible types
required: java.util.Date
found: java.lang.String
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[155,20] cannot find symbol
symbol: method isEndAllDay()
location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[162,48] cannot find symbol
symbol: method isEndAllDay()
location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[166,39] cannot find symbol
symbol: method getOrganizer()
location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[167,39] cannot find symbol
symbol: method getAttendees()
location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/ProductResultHandler.java:[81,55] cannot find symbol
symbol: method getRawText()
location: class com.google.zxing.client.result.ExpandedProductParsedResult
[INFO] 33 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.176s
[INFO] Finished at: Fri Feb 21 10:19:50 EET 2014
[INFO] Final Memory: 24M/351M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project zxing: Compilation failure: Compilation failure:
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/camera/CameraManager.java:[26,24] cannot find symbol
[ERROR] symbol: class PlanarYUVLuminanceSource
[ERROR] location: package com.google.zxing
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/camera/CameraManager.java:[300,10] cannot find symbol
[ERROR] symbol: class PlanarYUVLuminanceSource
[ERROR] location: class com.google.zxing.client.android.camera.CameraManager
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHandler.java:[23,24] cannot find symbol
[ERROR] symbol: class PlanarYUVLuminanceSource
[ERROR] location: package com.google.zxing
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHandler.java:[110,39] cannot find symbol
[ERROR] symbol: class PlanarYUVLuminanceSource
[ERROR] location: class com.google.zxing.client.android.DecodeHandler
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[141,19] cannot find symbol
[ERROR] symbol: method getValueType()
[ERROR] location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[147,19] cannot find symbol
[ERROR] symbol: method getValueType()
[ERROR] location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[152,19] cannot find symbol
[ERROR] symbol: method getValueType()
[ERROR] location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[157,19] cannot find symbol
[ERROR] symbol: method getValueType()
[ERROR] location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[172,19] cannot find symbol
[ERROR] symbol: method getValueType()
[ERROR] location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[194,80] cannot find symbol
[ERROR] symbol: method getValueType()
[ERROR] location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[218,21] cannot find symbol
[ERROR] symbol: method getValueType()
[ERROR] location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHintManager.java:[223,23] cannot find symbol
[ERROR] symbol: method getValueType()
[ERROR] location: variable hintType of type com.google.zxing.DecodeHintType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java:[745,76] cannot find symbol
[ERROR] symbol: variable UPC_EAN_EXTENSION
[ERROR] location: class com.google.zxing.ResultMetadataType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java:[748,88] cannot find symbol
[ERROR] symbol: variable UPC_EAN_EXTENSION
[ERROR] location: class com.google.zxing.ResultMetadataType
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/camera/CameraManager.java:[306,16] cannot find symbol
[ERROR] symbol: class PlanarYUVLuminanceSource
[ERROR] location: class com.google.zxing.client.android.camera.CameraManager
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/DecodeHandler.java:[78,5] cannot find symbol
[ERROR] symbol: class PlanarYUVLuminanceSource
[ERROR] location: class com.google.zxing.client.android.DecodeHandler
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/wifi/WifiConfigManager.java:[131,35] cannot find symbol
[ERROR] symbol: method isHidden()
[ERROR] location: variable wifiResult of type com.google.zxing.client.result.WifiParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/encode/QRCodeEncoder.java:[304,57] cannot find symbol
[ERROR] symbol: method getURLs()
[ERROR] location: variable contact of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/AddressBookResultHandler.java:[126,33] cannot find symbol
[ERROR] symbol: method getNicknames()
[ERROR] location: variable addressResult of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/AddressBookResultHandler.java:[138,33] cannot find symbol
[ERROR] symbol: method getURLs()
[ERROR] location: variable addressResult of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/AddressBookResultHandler.java:[140,33] cannot find symbol
[ERROR] symbol: method getGeo()
[ERROR] location: variable addressResult of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/AddressBookResultHandler.java:[196,36] cannot find symbol
[ERROR] symbol: method getURLs()
[ERROR] location: variable result of type com.google.zxing.client.result.AddressBookParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[65,40] cannot find symbol
[ERROR] symbol: method getOrganizer()
[ERROR] location: variable calendarResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[76,38] cannot find symbol
[ERROR] symbol: method isStartAllDay()
[ERROR] location: variable calendarResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[80,38] cannot find symbol
[ERROR] symbol: method getAttendees()
[ERROR] location: variable calendarResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[150,36] incompatible types
[ERROR] required: java.util.Date
[ERROR] found: java.lang.String
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[151,46] cannot find symbol
[ERROR] symbol: method isStartAllDay()
[ERROR] location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[153,32] incompatible types
[ERROR] required: java.util.Date
[ERROR] found: java.lang.String
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[155,20] cannot find symbol
[ERROR] symbol: method isEndAllDay()
[ERROR] location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[162,48] cannot find symbol
[ERROR] symbol: method isEndAllDay()
[ERROR] location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[166,39] cannot find symbol
[ERROR] symbol: method getOrganizer()
[ERROR] location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/CalendarResultHandler.java:[167,39] cannot find symbol
[ERROR] symbol: method getAttendees()
[ERROR] location: variable calResult of type com.google.zxing.client.result.CalendarParsedResult
[ERROR] /D:/Projects/Inherd/Libraries/trunk/zxing/src/main/java/com/google/zxing/client/android/result/ProductResultHandler.java:[81,55] cannot find symbol
[ERROR] symbol: method getRawText()
[ERROR] location: class com.google.zxing.client.result.ExpandedProductParsedResult
[ERROR] -> [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 following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
答案 0 :(得分:1)
看起来您在依赖项(2.0)中使用的是旧版本的库。
请参阅http://search.maven.org/#artifactdetails%7Ccom.google.zxing%7Ccore%7C2.3.0%7Cjar
答案 1 :(得分:0)
pom.xml的最新版本
<?xml version="1.0" encoding="utf-8"?>
<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>com.a.zxing</groupId>
<artifactId>zxing</artifactId>
<version>1.0.0</version>
<packaging>apklib</packaging>
<name>zxing library</name>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${android.platform.version}</version>
<!--<exclusions>
<exclusion>
<artifactId>xpp3</artifactId>
<groupId>xpp3</groupId>
</exclusion>
</exclusions>-->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r7</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<sdk>
<platform>${android.sdk.platform}</platform>
<path>${android.sdk.path}</path>
</sdk>
<dexOptimize>false</dexOptimize>
<dex>
<preDex>false</preDex>
<preDexLibLocation>/tmp/predexedLibs</preDexLibLocation>
</dex>
<dexCoreLibrary>true</dexCoreLibrary>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>srccore</source>
<!-- <source>gen</source>-->
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>