First off I did run into
the problem you addressed here, and your fix worked.
I then kept getting this error whenever I tried to build the game:
Code: Select all
C:\rapt-6.13.11.0>android.py build mygame release
Updating build files.
Updated project.properties
Updated local.properties
Added file C:\rapt-6.13.11.0\build.xml
Updated file C:\rapt-6.13.11.0\proguard-project.txt
Creating assets directory.
Traceback (most recent call last):
File "C:\rapt-6.13.11.0\android.py", line 66, in <module>
main()
File "C:\rapt-6.13.11.0\android.py", line 54, in main
build.build(iface, args.argument[0], args.argument[1:])
File "buildlib\build.py", line 312, in build
build_core(iface, directory, commands)
File "buildlib\build.py", line 258, in build_core
os.rename(old, new)
WindowsError: [Error 5] Access is denied
So after a bit of digging and some debug output added, I found that it was erroring out when trying to rename a folder. It was generally a different folder each time. I'm guessing it was happening due to a file in the folder having just been renamed and still momentarily being locked by Windows, preventing the folder from being renamed.
I came up with a workaround fix for it which consistently works for me. On line 257 / 258 (depends on whether the additional fix above is added) of build.py I replaced this:
with this to make it pause for a second and then try again:
Code: Select all
try:
os.rename(old, new)
except WindowsError:
iface.info("Error renaming file, will try again: " + old)
time.sleep(1.0)
os.rename(old, new)
iface.info("Second rename attempt succeeded, continuing.")
I'm able to then complete the build and install the signed APK onto my tablet.