Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/205.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android support-v4的无效LOC标头Maven编译错误_Android_Maven - Fatal编程技术网

Android support-v4的无效LOC标头Maven编译错误

Android support-v4的无效LOC标头Maven编译错误,android,maven,Android,Maven,maven构建我的pom.xml文件时,我遇到编译失败错误 编译错误为: 读取C:\Users\amrit\.m2\repository\com\google\android\support-v4\r6\support-v4-r6.jar时出错;无效的LOC标头(错误签名)。 有人知道如何解决这个问题吗? 下面是我的pom.xml文件: <project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3

maven构建我的
pom.xml
文件时,我遇到编译失败错误

编译错误为:

读取C:\Users\amrit\.m2\repository\com\google\android\support-v4\r6\support-v4-r6.jar时出错;无效的LOC标头(错误签名)。

有人知道如何解决这个问题吗? 下面是我的
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>MyListReq</groupId>
<artifactId>MyListReq</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>AtosList</name>


<dependencies>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>4.1.1.4</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>support-v4</artifactId>
        <version>r6</version>
    </dependency>

</dependencies>



<build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>

        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
                <fork>true</fork>
                <executable>C:\Program Files\Java\jdk1.7.0_03\bin\javac.exe
                </executable>
            </configuration>
        </plugin>

        <plugin>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <configuration>
                <sdk>
                    <path>${env.ANDROID_HOME}</path>
                    <platform>17</platform>
                </sdk>
            </configuration>
            <extensions>true</extensions>
        </plugin>

    </plugins>
</build>

4.0.0
MyListReq
MyListReq
0.0.1-快照
原子学家
com.google.android
安卓
4.1.1.4
假如
com.google.android
支持-v4
r6
src
maven编译器插件
3.1
1.6
1.6
真的
C:\ProgramFiles\Java\jdk1.7.0\u 03\bin\javac.exe
com.jayway.maven.plugins.android.generation2
安卓maven插件
${env.ANDROID_HOME}
17
真的


我无法解决这个问题。任何帮助都将不胜感激。

该错误意味着本地缓存的
.jar
已损坏。请删除
C:\Users\amrit.m2\repository\com\google\android\support-v4\r6\support-v4-r6.jar
,并允许Maven重新下载该文件

如果错误仍然发生,那么Maven从中下载
.jar
的源存储库是坏的。考虑切换Maven存储库或更改到不同版本的库-<代码> R7< /代码>(如果可以的话),例如:

<dependency>
    <groupId>com.google.android</groupId>
    <artifactId>support-v4</artifactId>
    <version>r7</version>
</dependency>

com.google.android


注意:谷歌不负责将这些库添加到Maven存储库中,这就是为什么a)它们没有保持最新,b)为什么(有时)它们会损坏-请参阅

非常感谢,b,通过切换到r7,问题得到解决。但现在它给出了另一个编译错误R不存在。请编辑您的问题并添加带有新错误的日志,然后阅读我已经阅读了您提供的链接,但没有找到解决我问题的适当方法。我把它作为一个新问题发布了。查看此链接:。