Hello, I’ve received message trying to run my app in Android Studio. Hierarchy looks like -Project
–MyProjectCore
—build.gradle
–MyProjectMain
—build.gradle
– build.gradle
– setting.gradle
Error: Execution failed for task ‘:MyProject:prepareMyProjectCoreUnspecifiedLibrary’. > Could not expand ZIP ‘/home/user/workspace/MyProject/MyProjectCore/build/libs/MyProjectCore.aar’.
But after rebuild it works until next run and I need to rebuild project once again (sometimes i’ve spent about 20 minutes for each rebuild).
build.gradle is typical file for android project, but in dependencies I compile Core project (which is library) dependencies {
compile project(’:MyProjectCore’) }
settings.gradle: include ‘:MyProjectCore’ include ‘:MyProject’
Threre is interesting things: this all used to work, but once day it throws this error. So I don’t know what to do
I’m sorry, but it was noisy exception, so I deleted project and re-created in another folder and it fixed this problem( So I hope another person who will have the same problem will write full error
All symptoms were the same with me. It worked for a long time, then it started doing this, for no apparent reason. Rebuild fixed it for a while, then after few minor code changes, error…
Did you get that after extracting it from ‘/Users/daemontus/AndroidProjects/VideoOnTextureTestProject/VideoOnTextureTest/build/exploded-bundles/VideoOnTextureTestProjectLibrariesVuforiaUnspecified.aar’ ?
There is no AAR archive in the build/exploded-bundles folder. There is just a folder named VideoOnTextureTestProjectLibrariesVuforiaUnspecified.aar. So I took the permissions of the file inside that folder. If you tell me where I can find the original AAR archive, I can tell you if the permissions are the same.
So, fingers crossed, have to test it a bit more, but I probably managed to fix it!
Problem was not the .aar archive, nor the .jar in it. The problem was the original jar file in the libs folder of my project. For some reason, no one could write into it (-r-xr-xr-x). I changed the permissions so that everyone can change it (-rwxrwxrwx) and voila, it seems to work.
Although I’m not sure why would gradle need to write into the jarfile, niether I can tell why rebuild always fixed it for a while, at least it works.