Skip to content

Update Android project for compatibility with Flutter 3.27#3

Open
mauriziopinotti wants to merge 1 commit into
LaemonT:mainfrom
easyhour:upgrade_android_project
Open

Update Android project for compatibility with Flutter 3.27#3
mauriziopinotti wants to merge 1 commit into
LaemonT:mainfrom
easyhour:upgrade_android_project

Conversation

@mauriziopinotti

Copy link
Copy Markdown

Flutter 3.27 uses compileSdk 35 on Android, which requires AGP 8.1.0 or higher:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:bundleReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable
   > Android resource linking failed
     aapt2 E 12-31 12:56:23 150001 150001 LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data.
     aapt2 E 12-31 12:56:23 150001 150001 ApkAssets.cpp:149] Failed to load resources table in APK '/home/maurix/Android/Sdk/platforms/android-35/android.jar'.
     error: failed to load include path /home/maurix/Android/Sdk/platforms/android-35/android.jar.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s
Running Gradle task 'assembleRelease'...                           17.2s

┌─ 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:                               │
│ /home/maurix/Projects/simple_file_saver/simple_file_saver/example/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:                                                                │
│ /home/maurix/Projects/simple_file_saver/simple_file_saver/example/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: │
│ /home/maurix/Projects/simple_file_saver/simple_file_saver/example/android/app/build.gradle                                            │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1

This PR updates AGP to 8.1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant