┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Using compileSdk 35 requires Android Gradle Plugin (AGP) 8.1.0 or higher. │
│ Please upgrade to a newer AGP version. The version of AGP that your project uses is likely │
│ defined in: │
│ C:\git_repo\lalalabs_flutter_renewal\android\settings.gradle, │
│ in the 'plugins' closure (by the number following "com.android.application"). │
│ Alternatively, if your project was created with an older version of the templates, it is likely │
│ in the buildscript.dependencies closure of the top-level build.gradle: │
│ C:\git_repo\lalalabs_flutter_renewal\android\build.gradle, │
│ as the number following "com.android.tools.build:gradle:". │
│ │
│ Finally, if you have a strong reason to avoid upgrading AGP, you can temporarily lower the │
│ compileSdk version in the following file: │
│ C:\git_repo\lalalabs_flutter_renewal\android\app\build.gradle │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1
💣Execution failed for task ':processDebugResources' 에러 발생!!!
그리고 Using compileSdk 35 requires Android Gradle Plugin (AGP) 8.1.0 or higher. 이런 문제도 발생했다.
이 문제 때문에 애뮬레이터 빌드가 되지 않았다...
✅ 원인
👉 compileSdk 35을 사용 중인데 AGP(Android Gradle Plugin)가 최신 버전이 아님!
👉 android-35 플랫폼의 android.jar 파일 문제
📍 해결 방법
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
아래와 같이 수정했준다...
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
networkTimeout=10000
plugins {
// 기존
id "com.android.application" version "7.3.0" apply false
// 수정
id "com.android.application" version "8.1.0" apply false
(+) android-35 플랫폼의 android.jar 파일 문제는 여전히 다소 미궁 속에...
안드로이드 스튜디오를 삭제하고 재설치해서 디바이스를 추가했다. 난 API 35는 필요없었는데, 왜 자꾸 저절로 재설치가 되는 것인지....
계속 오류나더니 위 방법으로 수정하고 난 후에는 API 35가 자동 설치되어도 잘 동작했다... 흠🤔
덕분에 며칠 헤매던거 수습했습니다. 정말 감사합니다!