Add to app update instructions (#2429)

[#2330
(comment)](https://github.com/flutter/samples/pull/2330#issuecomment-2195725456)
pull/2432/head
Eric Windmill 4 months ago committed by GitHub
parent b6e58325bf
commit 1fc751f0cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -55,3 +55,25 @@ functionality, similar to a full Flutter app.
If you run into an issue with the sample itself, please file an issue
in the [Flutter samples repo](https://github.com/flutter/samples/issues).
## Updating Android samples and its dependencies
1. Open the top level build.gradle file in Android Studio
2. Open “Upgrade Assistant” and click upgrade
### Troubleshooting Android updates
* If after upgrading it fails to build, try upgrading to a slightly less new version
* If there's an "Unknown class version exception <VERSION NUMBER>" try setting the version of Java used by modifying JAVA_HOME
* If it still fails to build, check that the Flutter code referenced in the build is up-to-date and doesn't use discontinued plugins. (Common cases include “namespace”)
* The 'project structure' -> 'modules' view can be helpful in understanding the dependency tree.
* Once the app builds with the latest gradle/agp, update any deprecated usages in app/build.gradle
* compileSdkVersion -> sdkVersion
* Update the target sdk version and read through each target sdk update
* Export broadcast receivers
* Update the way flutter is imported to use flutter gradle plugin
* https://flutter.dev/go/flutter-gradle-plugin-apply
* **When updating an app that uses AAR as a Flutter module** -- In android studio update any android dependencies that are indicated as in yellow as old. Keep `androidx.test:runner`, `androidx.test.espresso:espresso-core`, and `androidx.test:core`, as defined in https://github.com/flutter/packages/tree/main/packages/espresso

Loading…
Cancel
Save