This commit is contained in:
Your Name 2025-07-09 17:31:31 +07:00
parent c91e86431f
commit df99597720
2 changed files with 0 additions and 145 deletions

View File

@ -1,48 +0,0 @@
@echo off
echo ========================================
echo Deep Clean - Flutter & Gradle Cache
echo ========================================
echo.
echo 1. Stopping all Java and Gradle processes...
taskkill /f /im java.exe 2>nul
taskkill /f /im gradle.exe 2>nul
echo.
echo 2. Cleaning Flutter cache...
C:\sdk\flutter\bin\flutter clean
echo.
echo 3. Cleaning Gradle cache (if accessible)...
if exist "%USERPROFILE%\.gradle" (
echo Removing Gradle cache...
rmdir /s /q "%USERPROFILE%\.gradle" 2>nul
)
echo.
echo 4. Cleaning Android build cache...
if exist "android\.gradle" (
rmdir /s /q "android\.gradle" 2>nul
)
if exist "android\build" (
rmdir /s /q "android\build" 2>nul
)
if exist "android\app\build" (
rmdir /s /q "android\app\build" 2>nul
)
echo.
echo 5. Getting Flutter dependencies...
C:\sdk\flutter\bin\flutter pub get
echo.
echo 6. Testing Gradle wrapper...
cd android
gradlew --version
cd ..
echo.
echo ========================================
echo Deep clean completed!
echo ========================================
pause

View File

@ -1,97 +0,0 @@
@echo off
echo ========================================
echo FORCE GRADLE TO USE JAVA 11
echo ========================================
echo.
echo Current JAVA_HOME: %JAVA_HOME%
echo.
echo Setting JAVA_HOME to Java 11 for this session...
set "JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-11.0.21.9-hotspot"
echo ✓ JAVA_HOME set to: %JAVA_HOME%
echo.
echo Setting PATH to prioritize Java 11...
set "PATH=%JAVA_HOME%\bin;%PATH%"
echo ✓ PATH updated
echo.
echo Verifying Java version...
java -version
echo.
echo ========================================
echo UPDATING GRADLE WRAPPER CONFIGURATION
echo ========================================
echo.
echo Updating gradle-wrapper.properties to use compatible Gradle version...
(
echo distributionBase=GRADLE_USER_HOME
echo distributionPath=wrapper/dists
echo zipStoreBase=GRADLE_USER_HOME
echo zipStorePath=wrapper/dists
echo distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
) > android\gradle\wrapper\gradle-wrapper.properties
echo ✓ gradle-wrapper.properties updated
echo.
echo Updating gradle.properties with Java 11 settings...
(
echo org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
echo android.useAndroidX=true
echo android.enableJetifier=true
echo org.gradle.parallel=true
echo org.gradle.daemon=true
echo org.gradle.configureondemand=true
echo org.gradle.java.home=%JAVA_HOME%
) > android\gradle.properties
echo ✓ gradle.properties updated
echo.
echo ========================================
echo CLEARING GRADLE CACHES
echo ========================================
echo.
echo Stopping Gradle daemons...
cd android
gradlew --stop
cd ..
echo ✓ Gradle daemons stopped
echo.
echo Clearing Gradle caches...
if exist "android\.gradle" (
rmdir /s /q "android\.gradle"
echo ✓ android\.gradle removed
)
if exist "%USERPROFILE%\.gradle" (
rmdir /s /q "%USERPROFILE%\.gradle"
echo ✓ Global Gradle cache removed
)
echo.
echo ========================================
echo TESTING GRADLE WITH JAVA 11
echo ========================================
echo.
echo Testing Gradle version with Java 11...
cd android
gradlew --version
cd ..
echo.
echo ========================================
echo READY TO BUILD
echo ========================================
echo.
echo Now try building your Flutter app:
echo flutter build apk --debug
echo.
echo If you still get Java version errors, restart your IDE and try again.
echo.
pause