Player build error: IOException: Failed to move file

I keep getting this error when I try to use my .aar plugin created in Android studio on Unity 3d

Error building Player: IOException: Failed to Move File / Directory from 'Temp/StagingArea\android-libraries\app-release\classes.jar' to 'Temp/StagingArea\android-libraries\app-release\libs\classes.jar'.
+4
source share
4 answers

Use the provided scope in gradle.

https://sinking.in/blog/provided-scope-in-gradle/

dependencies 
{
    provided fileTree(dir: 'libs', include: ['*.jar'])
}
+13
source

You need to remove "libs / classes.jar" in your aare (use your favorites archive manager, it's just a ZIP file), because Unity will enter it on its own. Unity will fail if it is already gone.

+5
source

Im works with Unity-Editor and visual Studio. What worked for me, simply deleted these files mentioned in the error log. The editor managed to create after that on my Android device. Since then, my game has worked great.

0
source

open your project in unity show the project folder if you are on ios. or go to the project folder if you are on a Windows platform. Search for .aar files in the entire project and delete all files. restart the project and create apk.

-1
source

Source: https://habr.com/ru/post/1650073/


All Articles