3

I just installed Android Studio on Ubuntu this morning and I've got a problem with gradle.

It mentions that

  Error:Execution failed for task ':app:prepareComAndroidSupportAnimatedVectorDrawable2420Library'.
> Could not expand ZIP '/home/beetlikeyg087/Android/Sdk/extras/android/m2repository/com/android/support/animated-vector-drawable/24.2.0/animated-vector-drawable-24.2.0.aar'.

I keep googling it to find similar problem, but those couldn't solve my problem.

These are the details about my Android Studio

  1. Gradle version is 2.14.1

  2. Android gradle plugin version is 2.1.3

  3. buildToolsVersion "24.0.1"

  4. appcompat version is com.android.support:appcompat-v7:24.2.0

  5. Java JDK version is 1.8

And I already installed all packages that seem necessary.

Also already checked that animated-vector-drawable-24.2.0.aar file is in the folder.

So, as far as until now I have no idea how to fix this problem.

PS. I also have Android Studio in Windows OS, and it just works fine.

Community
  • 1
  • 1
  • This answer helps? http://stackoverflow.com/a/21501094/5183999 – nshmura Aug 20 '16 at 15:52
  • I have the same issue. In my case, it does not seem to be a permissions issue. With my user (which is member of the group that owns the folder, and who has 775 permissions) I can write files in that folder manually. However, from within Android Studio I get the same error. – Jose Gómez Aug 20 '16 at 16:10
  • I tried to get write access permission to those directories by using chmod -R 777, but seems not solve the issue. –  Aug 20 '16 at 16:21

2 Answers2

1

Finally, This issue is solved.

It is because I installed Ubuntu in Thai language system, so I reinstalled Ubuntu with English system and installed android studio again.

And it works perfectly.

So, the issue is not about permission or something else but it is language system. If you have the same problem as mine, you should check your language system first, once if it is not English (but it is your language instead) , you should change it to English system.

I don't know why it happened like that, but it solved my problem.

The conclusion is if you try every method you do and still can't solve the issue, this might be the last solution for you.

Thank you.

  • This does not apply to me; I already use Ubuntu in English. So, maybe something else was fixed during the reinstall. – Jose Gómez Aug 24 '16 at 23:54
0

I have fixed the issue for my case. I have Android Studio installed in /opt/android-studio (though with the folders and files belonging to my user), and the SDK in a NTFS drive.

For that NTFS drive, fstab was set so that the drive was mounted as root:plugdev, being my user member of the plugdev group. This way I could do everything with my user, as per the permissions set in fstab.

UUID=ABCDEFG1234567890 /mnt/driveroot      ntfs    defaults,gid=46,dmask=002,fmask=003 0       0

Changing the drive so that it is mounted as myuser:plugdev, this error has disappeared in Android Studio.

UUID=ABCDEFG1234567890 /mnt/driveroot      ntfs    defaults,uid=1000,gid=46,dmask=002,fmask=003 0       0

I can't make sense of why it is working in one way and not the other, since permissions are the same for the owner and for the group.

Jose Gómez
  • 3,110
  • 2
  • 32
  • 54