Skip to content

Commit 1fc751f

Browse files
authored
Add to app update instructions (#2429)
[#2330 (comment)](#2330 (comment))
1 parent b6e5832 commit 1fc751f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

add_to_app/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,25 @@ functionality, similar to a full Flutter app.
5555

5656
If you run into an issue with the sample itself, please file an issue
5757
in the [Flutter samples repo](https://github.com/flutter/samples/issues).
58+
59+
60+
## Updating Android samples and its dependencies
61+
62+
1. Open the top level build.gradle file in Android Studio
63+
2. Open “Upgrade Assistant” and click upgrade
64+
65+
### Troubleshooting Android updates
66+
67+
* If after upgrading it fails to build, try upgrading to a slightly less new version
68+
* If there's an "Unknown class version exception <VERSION NUMBER>" try setting the version of Java used by modifying JAVA_HOME
69+
* 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”)
70+
* The 'project structure' -> 'modules' view can be helpful in understanding the dependency tree.
71+
* Once the app builds with the latest gradle/agp, update any deprecated usages in app/build.gradle
72+
73+
* compileSdkVersion -> sdkVersion
74+
* Update the target sdk version and read through each target sdk update
75+
* Export broadcast receivers
76+
* Update the way flutter is imported to use flutter gradle plugin
77+
* https://flutter.dev/go/flutter-gradle-plugin-apply
78+
79+
* **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

0 commit comments

Comments
 (0)