gradle, Could not expand ZIP appcompat-v7:19.0.1

后端 未结 16 2154
离开以前
离开以前 2020-12-01 16:10

I have a problem with Android Studio and Gradle to import appcompat-v7.

So here is my src/build.gradle:

apply plugin: \'andro         


        
相关标签:
16条回答
  • 2020-12-01 16:36

    If you're on *UNIX, you can run this command from the Android Studio command line

    sudo chmod -R 777 /your/project/path
    
    0 讨论(0)
  • 2020-12-01 16:36

    In my case it was a windows permission problem. The project was created from Cygwin, and all folders had strange permissions

    0 讨论(0)
  • 2020-12-01 16:36

    i think i can help you,you should try to remove your project to your Ubuntu user directory,like /home/username/, then, reload your project and work it.

    0 讨论(0)
  • 2020-12-01 16:37

    Just wanted to add my experience. I was getting this error for a kafka jar

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Could not expand ZIP '/home/srangwal/.gradle/caches/modules-2/files-2.1/org.apache.kafka/kafka_2.9.2/0.8.2.0/f9e44ac2d80afee7d5696f11814e6a65af5a380a/kafka_2.9.2-0.8.2.0.jar'.
    > Could not copy zip entry /home/srangwal/.gradle/caches/modules-2/files-2.1/org.apache.kafka/kafka_2.9.2/0.8.2.0/f9e44ac2d80afee7d5696f11814e6a65af5a380a/kafka_2.9.2-0.8.2.0.jar!kafka/consumer/ZookeeperConsumerConnector$ZKRebalancerListener$$anonfun$kafka$consumer$ZookeeperConsumerConnector$ZKRebalancerListener$$addPartitionTopicInfo$1.class to '/home/srangwal/work-projects/griffin/build/tmp/expandedArchives/kafka_2.9.2-0.8.2.0.jar_7e6mtfrbv2j9f9v18u5gsfe9q/kafka/consumer/ZookeeperConsumerConnector$ZKRebalancerListener$$anonfun$kafka$consumer$ZookeeperConsumerConnector$ZKRebalancerListener$$addPartitionTopicInfo$1.class'.
    

    To debug, I tried to touch the file that gradle was trying to create, since permissions of all my directories were fine

    touch '/home/srangwal/work-projects/griffin/build/tmp/expandedArchives/kafka_2.9.2-0.8.2.0.jar_7e6mtfrbv2j9f9v18u5gsfe9q/kafka/consumer/ZookeeperConsumerConnector$ZKRebalancerListener$$anonfun$kafka$consumer$ZookeeperConsumerConnector$ZKRebalancerListener$$addPartitionTopicInfo$1.class'
    touch: cannot touch ‘/home/srangwal/work-projects/griffin/build/tmp/expandedArchives/kafka_2.9.2-0.8.2.0.jar_7e6mtfrbv2j9f9v18u5gsfe9q/kafka/consumer/ZookeeperConsumerConnector$ZKRebalancerListener$$anonfun$kafka$consumer$ZookeeperConsumerConnector$ZKRebalancerListener$$addPartitionTopicInfo$1.class’: File name too long
    

    I was getting this error because I was working on an encrypted filesystem in ubuntu and the encrypted filesystem did not allow very long filenames.

    0 讨论(0)
  • 2020-12-01 16:38

    I had the same problem when I've tried to build project in IntelliJ IDEA 13.1.4 and my multi-module project today. Not very good solution, but I've unchecked "Compile independent modules in parallel (may require larger heap space)" and problem disappeared. Moreover, Gradle configuration for my project probably isn't ideal (but i can still successfully build project via command line) and i'm checking weak places.

    0 讨论(0)
  • 2020-12-01 16:42

    Guys this "COULD" be the problem that your Library is not compatible with the gradle version as it was with me. So I reduced the gradle version and it worked. I suggest that you try changing your gradle version and then build again. Hope it helps someone.

    0 讨论(0)
提交回复
热议问题