[TIMOB-27882] Android: Unable to do a production build after switching SDK on Windows
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-08-14T18:03:13.000+0000 |
Affected Version/s | Release 9.0.1 |
Fix Version/s | Release 9.1.0 |
Components | Android |
Labels | android, build, gradle |
Reporter | Samir Mohammed |
Assignee | Joshua Quick |
Created | 2020-05-06T15:01:33.000+0000 |
Updated | 2020-08-14T18:03:13.000+0000 |
Description
When creating a production build with two different SDKs the following error can be seen:
[ERROR] : Error: EBUSY: resource busy or locked, unlink 'C:\Users\APPC\Documents\Appcelerator_Studio_Workspace\elloello\build\android\app\build\intermediates\metadata_library_dependencies_report\release\dependencies.pb'
*Note*: If you manually end the java-tm process you are able to build
*Test Steps:*
[~smohammed], would you mind trying something out for me please? (I don't have access to a Windows machine right now.) Please do this:
Do a "production" build with 9.0.2.
Open the Windows Command Prompt.
CD
to directory:<YourProject>/build/android
Enter:
gradlew :app:clean
Do a "production" build with 9.1.0.
The above checks to see if telling the gradle tools to clean the build folder will release the file lock for us. Thanks![~jquick] Following those steps I was able to do a production build without any issues. Console showed this output when doing:
gradlew :app:clean
If I tried doing
gradlew :app:clean
after a failed production build (as mentioned in the ticket description) console would show this message:Error is also seen when running a Hyperloop application. (In this instance first ran on a Sim and then a device straight after where the below error was seen)
PR (master): https://github.com/appcelerator/titanium_mobile/pull/11712 _*Edit:*_ _The below PRs have been closed and are not needed._ -PR (hyperloop):- https://github.com/appcelerator/hyperloop.next/pull/338 -PR (9.0.x):- https://github.com/appcelerator/titanium_mobile/pull/11713
[~smohammed], theoretically, cleaning a module via
appc ti clean
should have a file locking issue on Windows too. Since I don't have a Windows machine available to me, I'm not able to confirm this. So, I added a "Module Clean Test" to my PR posted above.Moving to Open Status
merged to master for 9.1.0 target
Closing ticket, Fix verified in SDK Version 9.1.0.v20200814072027 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11712