I want to reduce Android Studio project size to save it for after use
In MS Visual Studio, we can delete *.ipch, *.sdf and Debug files to reduce the project size
Please find the batch file I use to do that. Set the batch under the root of your project directories. Hoping it helps.
@rem ##########################################################################
@rem
@rem Export an ANDROID STUDIO application
@rem
@rem ##########################################################################
echo off
CLS
echo _________________________________________
echo ANDROID-STUDIO files sources export
echo _________________________________________
echo
echo If directory name includes space
echo - Surround name with quotes
echo _________________________________________
set /p dirname= Dir name to export :
if %dirname% == "" goto ERROR
set str=%dirname%
mkdir c:\EXPORT\%str%
pause
xcopy %dirname% c:\EXPORT\%str% /s
del c:\EXPORT\%str%\*.iml
del c:\EXPORT\%str%\app\*.apk
rmdir c:\EXPORT\%str%\.gradle /s /q
rmdir c:\EXPORT\%str%\.idea /s /q
rmdir c:\EXPORT\%str%\build /s /q
erase c:\EXPORT\%str%\app\build /f /s /q
rmdir c:\EXPORT\%str%\app\build /s /q
pause
goto END
:ERROR
echo Cannot create, check the directory root
goto OUT
:END
CLS
echo _________________________________________
echo ANDROID-STUDIO EXPORT
echo _________________________________________
echo Export ended, check c:\EXPORT
:OUT
pause